On Monday, 18 January 2016 at 05:59:15 UTC, tcak wrote:
I, due to a need, will start implementation of distributed memory system.

Idea is that:

Let's say you have allocated 1 GiB space in memory. This memory is blocked into 4 KiB.

After some reservation, and free operations, now only the blocks 0, 12, and 13 are free to be allocated.

Problem is that those memory blocks are not consecutive.

With the implementation of distributed memory, those blocks will be appended into a struct or object (however it is implemented), and that struct or object will allow access to that 12 KiB of space (3 x 4 KiB blocks) like it is allocated in memory consecutively.

Is there anything like this in Phobos, or shall I start my own implementation?

Just a note about terminology: I'd rather call it "fragmented memory" or something alike. The term "distributed memory" usually refers to something really different [1].

Your idea seems interesting, but IMHO a compacting GC should be the preferred solution for heap fragmentation.

[1] https://en.wikipedia.org/wiki/Distributed_memory

Reply via email to