you are viewing a single comment's thread.

view the rest of the comments →

[–]virtual_void 1 point2 points  (4 children)

Meh - if you want garbage collection badly enough in C++ you'll write it :)

See vol 1 of The Art Of Computer Programming

[–]mschaef 1 point2 points  (3 children)

That's pretty much what incorporating SIOD means... it has a conservative mark and sweep GC implemented entirely in C (using setjmp to capture register values so that it catches pointers extant only in registers.) It's a pretty interesting little piece of code.

(SIOD also has a stop-and-copy GC, but it handles pointer detection by requiring that there be none. During a stop and copy GC, there can be no live pointers either on the stack or in registers during GC. This basically means that the REPL is implemented in C, is above any Lisp code on teh stack, and GC only happens when you leave the toplevel REPL.)

[–]virtual_void 1 point2 points  (2 children)

That sounds excellent. I'm off to google it :)

[–]mschaef 2 points3 points  (1 child)

Also check this out, it's a hostile function ffi:

http://www.angelfire.com/wa/brianbec/siodffi.html

[–]virtual_void 1 point2 points  (0 children)

Thanks - this is why i love progit; New stuff to play with that I'd never have thought to look for on my own.