Boost logo

Boost Users :

Subject: Re: [Boost-users] [fiber] pooled_fixedsize_stack
From: DePizzottri (depizzottri_at_[hidden])
Date: 2017-09-14 08:36:51


> each fiber has its own stack (provided by the stack allocator)
> a fiber can only migrated between threads if it is in the suspended state
> the skynet_stealing_xyz.cpp does work-stealing (ready fibers are migrated
> between threads) - if you apply 'thread_local' to stack_allocator
> you will end up in a race if the fiber was migrated to another thread and
> tries to release its stack.

I completely forgot that the memory will be released, thank you.

> BTW, the memory allocator used by your libc usually does already cache the
> memory (depends on the algorithm and chunk size)

Yes, but I want to increase a speed by exploiting the benefits of
boost::pool when allocating a large number of equal size objects (stacks).
Hope it will be faster then simple tcmalloc.

--
Sent from: http://boost.2283326.n4.nabble.com/Boost-Users-f2553780.html

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net