The Double Headed Stack Allocator

(blog.demofox.org)

24 points | by g0xA52A2A 1 hour ago

2 comments

  • tyushk 27 minutes ago
    The single stack allocator seems to be an arena by other terms, but the double headed version is pretty neat.

    Is the final pattern described actually safe for multi-threaded use? Something like the stack has exactly 1 byte left, T1 allocates the dynamic end with 1 byte (dynamic object just happened to be 1 byte, say) and T2 allocates the fixed size end with 1 byte. Wouldn't they end up overlapping in that case?

  • carplaybits 1 hour ago
    [flagged]