Malloced data has a relatively large memory overhead, because a constant
size is added and the total is rounded to the nearest power of 2, (which
always must be larger than 32 or so). Some allocated elements of Freecell
Solver are still individually malloced, so it means it wastes a lot of
space this way.
I'd like to generalize the state_ia mechanism to be able to allocate
contigous blocks of memory of any size. I'll make it into a generic class
and make various parts of the program that use malloc a lot (the hash, the
indirect stack allocation, etc.) use it instead of malloc. That way, a lot
less memory will go to waste.
Regards,
Shlomi Fish
----------------------------------------------------------------------
Shlomi Fish shlomif_at_vipe.technion.ac.il
Home Page:
http://t2.technion.ac.il/~shlomif/
Home E-mail: shlomif_at_iglu.org.il
He who re-invents the wheel, understands much better how a wheel works.
Received on Wed May 29 2002 - 09:40:31 IDT