![]() |
Spicy
|
#include <fiber.h>
Public Member Functions | |
StackBuffer (const ::Fiber *fiber) | |
~StackBuffer () | |
std::pair< char *, char * > | activeRegion () const |
std::pair< char *, char * > | allocatedRegion () const |
size_t | activeSize () const |
size_t | allocatedSize () const |
size_t | liveRemainingSize () const |
void | save () |
void | restore () const |
Helper retaining a fiber's saved stack content.
|
inline |
Constructor.
fiber | fiber of which to track its current stack region |
detail::StackBuffer::~StackBuffer | ( | ) |
Destructor.
std::pair< char *, char * > detail::StackBuffer::activeRegion | ( | ) | const |
Returns the lower/upper addresses of the memory region that is currently actively in use by the fiber's stack. This value is only well-defined if the fiber is not currently executing.
|
inline |
Returns the size of the memory region that is currently actively in use by the fiber's stack. This value is only well-defined if the fiber is not currently executing.
std::pair< char *, char * > detail::StackBuffer::allocatedRegion | ( | ) | const |
Returns the lower/upper addresses of the memory region that is allocated for the fiber's stack.
|
inline |
Returns the size of the memory region that's allocated for the fiber's stack.
size_t detail::StackBuffer::liveRemainingSize | ( | ) | const |
Returns an approximate size of stack space left for a currently executing fiber.
void detail::StackBuffer::restore | ( | ) | const |
Copies previously saved stack content back into its original location. This does nothing if no content has been saved so far.
void detail::StackBuffer::save | ( | ) |
Copies the fiber's stack out into an internally allocated buffer.