RFR: Locked allocation

Andrew Haley aph at redhat.com
Thu Dec 15 10:15:07 UTC 2016


On 14/12/16 16:36, Roman Kennke wrote:
> When reviewing, please pay special attention to the lock in
> ShenandoahHeap::allocate_memory()!

I'm always rather nervous about anybody who invents their own
spinlocks.  It's a code smell: that doesn't mean it's wrong here, but
it does deserve attention.

I presume the idea here is that the native allocation is going to be
fairly rare because threads will usually allocate inline from their
own TLABs.  However, please consider the situation where a thread
holding the lock is descheduled.

Andrew.


More information about the shenandoah-dev mailing list