[GAP] Effect of using malloc for temporary allocations in GAP
caj21 at st-andrews.ac.uk
Tue Jan 3 15:58:58 GMT 2017
I'm going to give a short cop-out answer.
Reimer, who is an expert at this, and was paid for several years to make gap multithreaded, decided that the best option was to switch to boehm, and accept some decrease in GC speed (which can largely be compensated for my running garbage collection on multiple cores).
The main problem with multithreading gasman is that it is moving -- so we would in practice wait until every thread hits a point what it is safe to move, which means a memory allocation. It can take a long time for threads to reach such a point.
If we were starting from scratch we could do better, but all of gap's kernel code is written under the assumption that between memory allocations no memory location ever moves, or can be freed.
From: Dmitrii Pasechnik
Sent: Tuesday, 3 January, 13:21
Subject: Re: [GAP] Effect of using malloc for temporary allocations in GAP
To: Christopher Jefferson
Cc: Max Horn, gap at gap-system.org
Why would GASMAN be problematic with multithreading? Surely, it will need a mechanism to pause all the other threads while collecting garbage, but apart from this, is there anything fundamental that makes it hard to port?
More information about the Gap