[Interest] memory fragmentation?

Graeme Gill graeme2 at argyllcms.com
Wed Aug 22 15:36:44 CEST 2012


Jason H wrote:
> This seems like it would be slow, especially when you started using haddrist swap space, unless
> you have that turned off. I think that it would be better to just check against a limit yourself
> as to avoid allocating items that would be swapped.*

Not at all, because the aim is not to discover how much RAM there is (you can
look that up from the system), but what the practical virtual memory limit is,
taking into account existing allocations and unspecified system overhead.
Because the memory isn't committed until the allocations are accessed,
it's quite quick to allocate up to 4GB and then free it again.

> *I have no idea how your application uses the cache.

Basic LRU cache of intermediate computation results for a spatial
structure that is being accessed in an approximate space filling
curve order so as to maximise the cache hit rate.

Graeme Gill.



More information about the Interest mailing list