4 ms·
Ravenbrook: Memory Pool System
- tosh 7y agoHistorical context: https://www.ravenbrook.com/project/mps/doc/2002-01-30/ismm2002-paper/ismm2002.html https://www.ravenbrook.com/project/mps/doc/2002-01-30/ismm20...
- armitron 7y agoUnacceptable license for commercial use when there are near-equivalent better-licensed alternatives around.
- nickik 7y agoThis is a really cool system and has a lot of neat features. I used it for experimental Clojure VM. Here I have library that shows how to use it from Rust with one pre-defined memory layout for the objects. For people that are interested, here is an example of how to use it for a Clojure like language: https://github.com/clojit/clojit-cvm/blob/master/vm.c#L176 https://github.com/clojit/clojit-cvm/blob/master/vm.c#L176 It lays out the memory like this: 0 1 2 4 8 +---+---+-------+-------------+ <- 0 |mps| | class|size | +-----------------------------+ | tagged reference | +-----------------------------+ | tagged reference | +-----------------------------+ | tagged reference | +-----------------------------+ | tagged reference | +-----------------------------+ <- size mps here are a few bits you have to reserve to tell what MPS object it is. Padding and Forward you need to support in order for MPS to be able to move your objects. const uint8_t OBJ_MPS_TYPE_PADDING = 0x00; const uint8_t OBJ_MPS_TYPE_FORWARD = 0x01; const uint8_t OBJ_MPS_TYPE_OBJECT = 0x02;