Spicy
Public Member Functions | List of all members
hilti::rt::detail::StackBuffer Struct Reference

#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
 

Detailed Description

Helper retaining a fiber's saved stack content.

Constructor & Destructor Documentation

◆ StackBuffer()

hilti::rt::detail::StackBuffer::StackBuffer ( const ::Fiber fiber)
inline

Constructor.

Parameters
fiberfiber of which to track its current stack region

◆ ~StackBuffer()

detail::StackBuffer::~StackBuffer ( )

Destructor.

Member Function Documentation

◆ activeRegion()

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.

◆ activeSize()

size_t hilti::rt::detail::StackBuffer::activeSize ( ) const
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.

◆ allocatedRegion()

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.

◆ allocatedSize()

size_t hilti::rt::detail::StackBuffer::allocatedSize ( ) const
inline

Returns the size of the memory region that's allocated for the fiber's stack.

◆ liveRemainingSize()

size_t detail::StackBuffer::liveRemainingSize ( ) const

Returns an approximate size of stack space left for a currently executing fiber.

◆ restore()

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.

◆ save()

void detail::StackBuffer::save ( )

Copies the fiber's stack out into an internally allocated buffer.


The documentation for this struct was generated from the following files: