[Gc] Re: Want to find reason of heap size keep growth
biosli at hotmail.com
Fri Jul 9 00:42:06 PDT 2010
Bruce Hoult <bruce at ...> writes:
> Repeated allocation and freeing of such a large object is very likely
> to cause fragmentation and heap growth because once that space is in
> the heap and has been freed it is likely to start being used for
> smaller objects. Next time you need a large object there is no
> contiguous space and more has to be allocated.
I know the reason now, thanks. But is there some way let GC compress data,
that make small object together, then it will left more space for large block?
> Use your own free list for large objects, possibly rounding up to a
> few standard sizes if the natural size varies.
It's mean that I should ues OS malloc for all large block data and free them
by my self?
Thanks in advance,
More information about the Gc