cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/16/15:08:03

From: "Ben Davis" <ben AT vjpoole DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp,comp.games.development.programming.misc
Subject: Compacting the Memory
Date: Mon, 16 Aug 1999 15:31:07 +0100
Organization: Customer of Planet Online
Message-ID: <7p974q$4gg$1@news6.svr.pol.co.uk>
NNTP-Posting-Host: modem-53.amlodipine.dialup.pol.co.uk
X-Trace: news6.svr.pol.co.uk 934813658 4624 62.136.50.181 (16 Aug 1999 14:27:38 GMT)
NNTP-Posting-Date: 16 Aug 1999 14:27:38 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Lines: 10
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I am writing a program in DJGPP C, which uses the memory VERY dynamically:
there are loads of malloc()s and free()s. They occur in a strange order, and
some are quite large. If two blocks are allocated, and then the first one is
freed, and then a third, larger block is allocated before the second one is
freed, some memory is wasted (I fear).
What I would like to know is, does DJGPP automatically compact the memory by
moving blocks down to fill all the gaps, or do I have to do it manually? How
can I do this?


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019