Mail Archives: djgpp/1997/01/13/12:05:15
> 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 :))
- Raw text -