SST/macro
Public Member Functions | Private Attributes | List of all members
sstmac::sw::stack_alloc::chunk Class Reference

A chunk of allocated memory to be divided into fixed-size stacks. More...

#include <stack_alloc_chunk.h>

Collaboration diagram for sstmac::sw::stack_alloc::chunk:
Collaboration graph

Public Member Functions

 chunk (size_t stacksize, size_t suggested_chunk_size, bool use_mprot)
 Make a new chunk. More...
 
 ~chunk ()
 Goodbye. More...
 
void * get_next_stack ()
 

Private Attributes

char * addr_
 The base address of my memory region. More...
 
size_t size_
 The total size of my allocation. More...
 
size_t stacksize_
 The target size of each open (unprotected) stack region. More...
 
bool use_mprot_
 Are we putting mprot pages between allocations or not? More...
 
size_t next_stack_
 Next stack (for get_next_stack). More...
 

Detailed Description

A chunk of allocated memory to be divided into fixed-size stacks.

Definition at line 27 of file stack_alloc_chunk.h.

Constructor & Destructor Documentation

sstmac::sw::stack_alloc::chunk::chunk ( size_t  stacksize,
size_t  suggested_chunk_size,
bool  use_mprot 
)

Make a new chunk.

sstmac::sw::stack_alloc::chunk::~chunk ( )

Goodbye.

Member Function Documentation

void* sstmac::sw::stack_alloc::chunk::get_next_stack ( )

Member Data Documentation

char* sstmac::sw::stack_alloc::chunk::addr_
private

The base address of my memory region.

Definition at line 30 of file stack_alloc_chunk.h.

size_t sstmac::sw::stack_alloc::chunk::next_stack_
private

Next stack (for get_next_stack).

Definition at line 38 of file stack_alloc_chunk.h.

size_t sstmac::sw::stack_alloc::chunk::size_
private

The total size of my allocation.

Definition at line 32 of file stack_alloc_chunk.h.

size_t sstmac::sw::stack_alloc::chunk::stacksize_
private

The target size of each open (unprotected) stack region.

Definition at line 34 of file stack_alloc_chunk.h.

bool sstmac::sw::stack_alloc::chunk::use_mprot_
private

Are we putting mprot pages between allocations or not?

Definition at line 36 of file stack_alloc_chunk.h.


The documentation for this class was generated from the following file: