Date: Mon, 13 Jan 1997 17:41:19 +0100 (MET) From: Grzegorz Ludorowski To: kagel AT dg1 DOT bloomberg DOT com cc: djgpp AT delorie DOT com Subject: Re: how to free memory? In-Reply-To: <9701091833.AA13864@quasar.bloomberg.com > Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII > Another option is to wrapper malloc() and free(), etc and keep track yourself > of the currently allocated and/or freed memory blocks in a local data structure > maintained by the wrapper functions. (Remember that malloc() > requests/allocates memory blocks with their size rounded up to the next power > of 2!) > Ok. So I have to set some variables everytime I allocate or deallocate memory. It's clear. Besides, I don't know why have I to do that on my own? IMHO it should be done by djgpp... but ok - I can do it. (what will happened if I could not ?) But one thing sounds VERY strange to me: I can't allocate .. say 9MB of ram because when I will do that, djgpp will allocate 16MB.. am I right? It rounds up everything to the next power of 2? So what will happened if I'd like to allocate 10x 300kb? It will change to 10x512kb of allocated memory? If this is true [..censored..]. LUDO. PS. Or maybe I'm too lame to use djgpp :))