Re: GC performance - GC fragility
- From: Eric Grange <egrangeNO@xxxxxxxxxxxxxxx>
- Date: Mon, 28 Jan 2008 10:21:48 +0100
You normally will end with a heap looking like a swiss cheese.
It won't interestingly enough. Though the GC heap will look like one before compaction.
AFAIK FastMM tries to fight this with granularity and passing different allocation sizes to different "heap blocks", but it can't be IMHO generally be prevented.
Well the point you're missing here is that memory is the MM operates on virtual memory. If you only have macro-fragmentation in the virtual memory space, you can operate with limited fragmentation-induced waste (ie. below a constant amount) in the allocated memory space.
In practice you're looking at negligible amounts of memory waste compared to a GC (as all test cases so far have illustrated).
The only fragmentation that remains in FastMM is that of virtual memory when allocating large blocks. Though in 64bit, with virtually unlimited virtual memory that wouldn't be a problem at all (and in 64bit there are virtual memory solutions to reallocating large blocks to arbitrary sizes without a copy).
It's a big problem of long running applications.
FastMM and NexusDB (which uses a similar tactic) have been used in long running servers, and they are known to work without any stalls... unlike GC-based alternatives, where the GC stability is so poor that MS doesn't recommand the use of the concurrent GC in servers, but use of the blocking GC to maintain stability... that's because the concurrent GC can be gotten into a cycle of never ending GC compaction if your allocation rate exceeds or equals the compaction rate, a condition easy to reach when part of your allocated pool is swapped out.
how a native heap can (generally) prevent fragmentation,> without compacting the memory ?
I suggest looking up the basm ng archive in google, there were quite a few discussions on the subject (look for memory manager challenge threads).
Eric
.
- Follow-Ups:
- Re: GC performance - GC fragility
- From: Stig Johansen
- Re: GC performance - GC fragility
- From: Andre Kaufmann
- Re: GC performance - GC fragility
- References:
- GC performance - GC fragility
- From: Eric Grange
- Re: GC performance - GC fragility
- From: Atmapuri
- Re: GC performance - GC fragility
- From: Andre Kaufmann
- Re: GC performance - GC fragility
- From: Micha Nelissen
- Re: GC performance - GC fragility
- From: Andre Kaufmann
- GC performance - GC fragility
- Prev by Date: Re: Just for Fun - Animated Windows
- Next by Date: Re: Is dbExpress a dead end?
- Previous by thread: Re: GC performance - GC fragility
- Next by thread: Re: GC performance - GC fragility
- Index(es):
Relevant Pages
|