Mail Archives: djgpp/1997/01/05/09:26:25
Aaron m Clemmer wrote:
>
> >Believe me, you DON'T want to do that on your own without a *very* good
>
> >reason!
> I suppose there aren't many?
The malloc() routines are somewhat inefficient in that in order to
maintain a relatively fast system for tracking used and free blocks, the
size of all allocated memory is rounded up to the nearest power of 2.
So, allocating 600 bytes gets you 1024, 50000 bytes gets you 65536, 1.5
MB gets you 2 MB, etc. This usually isn't a problem for most people,
but if you really must have a more space-efficient memory management
system because of something your program does, you may consider using
some alternate techniques to minimize the block size loss.
Good luck!
--
John M. Aldrich, aka Fighteer I <fighteer AT cs DOT com>
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+:- a-->? c++>$ U@>++$ p>+ L>++ E>++ W++ N++ o+>++ K? w(---)
O- M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+(++) tv+() b+++ DI++ D++ G>++
e(*)>++++ h!() !r !y+()
------END GEEK CODE BLOCK------
- Raw text -