This paper on a malloc() replacement that DOES COMPACTION even on C/C++ is making the rounds:

Scarily beautiful.

@federicomena I assume they're updating pointers by making pages inaccessible and using a segfault handler? That's a lot more practical now that everything is 64 bit. I guess the need to keep the mappings around isn't that big a deal if you don't move objects gratuitously.

I'd been thinking about a similar approach for object-level virtual memory/persistence, inspired by "Pointer Swizzling At Page Fault Time" and the implementation of libgc.


@federicomena Another idea I had is to achieve some level of memory safety by never reusing addresses. This would work really well with a compacting allocator.

Sign in to participate in the conversation
R E T R O  S O C I A L

A social network for the 19A0s.