Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Got an Idea of GC. Please CC

Name: Anonymous 2014-05-27 0:07

Segmenting GC:
- Partition heap into N segments;
- Give each segment a bitmap, keeping what memory cells the segment references;
- After collecting a segment, compare its resulting bitmap to the original, then free now unused objects (bits that went from 1 to 0, and which also have 0 in other segments).

Pros:
- Incremental;
- Parallelizable into N threads;
- Collected memory can be distributed across N machines (share your memory accross Internet);
- Each segment could be future partitioned into subsegments, which are collectible separately.

Cons:
- Write barrier required;
- Bitmap memory is proportional to N;
- Execution time is proportional to memory_size/N.

Name: Anonymous 2014-05-30 17:21

>>69
It's not a perfect solution, however. You can waste a lot of memory through fragmentation. In fact, as a worst-case scenario, you could end up with 99% of ``free'' memory yet be unable to allocate anything larger than a word. The solutions vary:
- Compact the memory (mind you, this isn't GC, you're literally just moving blocks around without peeking inside them).
-- You'll have to peek inside objects to update the pointers though, so it's not a great solution. Either that, or use a pointer/handle table (which might or might not flush the cache more often that you'd like).
- Use regions.
-- This doesn't really prevent fragmentation, it merely restricts it somewhat.

Actually we should make a new thread on combating fragmentation.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List