[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Aliasing and Garbage Collection



Hi,

RE: 'buying more memory'.
Everything becomes clear! A confusion between GC and heap fragmentation.

RE: memory pools

Richard Benton:
> This is a similar concept to the memory pool
>...
> I guess that memory pools could either be fixed in size or be dynamically
> growing, according to implementation.

Thanks for this - I hadn't come across it before. I would guess that these
pools are contiguous blocks of (virtual) memory which means you have to
commit to a maximum size in advance.

I was thinking more along the lines of a graph structure where each node is
separately allocated from the main heap, but pointers are managed so that
they can never be used outside of their own graph. This may require a 'graph
id' to be kept with each pointer so that they can't be used out of place,
which is a cost I'd like to avoid.

Maybe the memory pool is a better idea - let the virtual memory system do
the work.

Tom.