🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #5129

Defragmenting memory

#5129
From: Rick Kitts
Date: Mon, 11 Mar 1991 23:58
17 lines
1055 bytes
I am working on a program which make heavy use of malloc() and free().
Apparently memory which is allocated and deallocated is never coalesced
which of course is leading me fragmented memory. A dump of the heap
using heapwalk() (from MicroSoft) indicates that I have many K of free
memory, but it is all in pieces which are too small to be useful.

Does anyone know of anyway to coalesce this memory? I am hoping to not
have to write my own memory manager, but it's starting to look like I
might.

BTW, I am using Microsloth C (painfully slow) version 6.0. Any help would
be greatly appreciated.

---Rick

rkitts@netcom.com
Technical Details
Message-ID: <27832@netcom.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!pacbell.com!tandem!netcom!netcom.COM

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!pacbell.com!tandem!netcom!netcom.COM
From: rkitts@netcom.COM (Rick Kitts)
Newsgroups: comp.os.msdos.programmer
Subject: Defragmenting memory
Message-ID: <27832@netcom.COM>
Date: 11 Mar 91 23:58:13 GMT
Sender: rkitts@netcom.COM
Distribution: na
Organization: Netcom - Online Communication Services  UNIX System {408 241-9760 guest}
Lines: 17