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-28 18:05

>>27
That's just syntatic sugar for


map:
push r13
push r14
push r15
call new_list
mov r13, rax
mov r14, rdi
mov r15, rsi
call len
mov rcx, rax
iterate_elems:
mov rdi, r14
mov rsi, rcx
call get_elem
mov rdi, rax
push rcx
call [r15]
pop rcx
mov rdi, r13
mov rsi, rcx
mov rdx, rax
push rcx
call set_elem
pop rcx
loop iterate_elems
mov rax, r13
pop r13
pop r14
pop r15
ret


As you can clearly see, there is a loop here (the `loop` instruction).

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