Mesh: a new approach to memory compaction for C/C++

Stefan Koch uplink.coder at googlemail.com
Wed Sep 18 09:48:35 UTC 2019


On Wednesday, 18 September 2019 at 09:31:07 UTC, Gregor Mückl 
wrote:
> On Tuesday, 17 September 2019 at 11:42:51 UTC, Per Nordlöw 
> wrote:
>> strangeloop talk here:
>>
>> https://www.youtube.com/watch?v=c1UBJbfR-H0
>>
>> and github repo here:
>>
>> https://github.com/plasma-umass/Mesh
>>
>> Sounds to me like making D's GC precise by default to enable 
>> memory compaction is worth pursuing.
>
> I'm am thinking about the implications for debugging. Mapping 
> the same page to two virtual memory addresses on the heap 
> creates weird situations where writing over the bounds of one 
> object doesn't trash allocations with nearby memory addresses, 
> but can affect seemingly far away allocations that ended up 
> randomly aliased to the same page. Even worse, Mesh randomizes 
> allocations within pages to get more opportunities to alias 
> pages. This means that some heap-smashing bug will likely 
> present itself differently on each run. Have fun finding the 
> root cause of that :/.

Good point. I hadn't thought about that.
All the additional OS calls to copy stuff into different physical
pages will also most likely also not be great for perf.
If the allocator increases the runtime of perlbench by 4%
that's acutally quite significant as I can't imagine perlbench 
runs fast.


More information about the Digitalmars-d mailing list