On Sat, 23 Sep 2000 21:15:28 +0200, Bernie wrote:
> Why not allocate the size completly dynamical?
Speed and fragmentation. Reallocating the size basically
done with a new allocation and deleting the old one after
suceeded. Internally, this done by traversing through
memory block chain one by one (its a linked-list). Deleting
an allocated memory block is achieved by marking its header
as "unused", effectively creating a "hole" which could only
reused when allocating smaller or the same memory block
size. Unless you handle memory management totally by
yourself, and has a very good garbage collection, then
resizing too often is not recommended.
--Eko
http://www.survpc.net/ - Older PC and DOS Internet
http://survpc.virtualave.net/ (noframe)