I just realized that it would probably be very easy to make the most common codepath for small (<2048 byte) memory allocations in the GC lock free using core.atomic. This case basically works by just popping a block off a free list. This can be safely done truly in parallel with allocations of different sizes, which are either hitting the large allocation code or a different free list. <br>
<br>Has this ever been considered and rejected before? It seems obvious enough in hindsight that I'm wondering why it's not already done, but then again I've been mucking around enough with the GC code lately that lots of ideas seem obvious to me that would be non-trivial to someone who hasn't worked with the code so much, so recently. If it hasn't been seriously considered before, is there any non-obvious reason why it might be a bad idea?<br>