Page MenuHome

Make memarena's alloc threadsafe.
AbandonedPublic

Authored by Bastien Montagne (mont29) on Dec 9 2014, 4:57 PM.

Details

Summary
  • Only makes (c)alloc threadsafe, other functions I would consider 'maintenance' ones, they should only be called by 'owner' thread anyway.
  • Kept it optional, because using spinlock here still makes allocations about twice slower, in the end... :/ Don't think we can avoid a lock here, though.
  • Code in MOD_meshdeform.c is of course for tests only, to be trashed before commit!

Diff Detail

Repository
rB Blender
Branch
memarena-threadsafe

Event Timeline

Bastien Montagne (mont29) retitled this revision from to Make memarena's alloc threadsafe..
Bastien Montagne (mont29) updated this object.

Well, couple of ideas.

  • We can keep the memarea thread-unsafe during evaluaiton, them make it safe afterwards.
  • Don't use arena for iterators

Don't have better ideas currently, need to think a bit more. Maybe @Campbell Barton (campbellbarton) have some ideas as well.