Hermes  0.9.5-beta
Hierarchical Distributed I/O Buffering System
hermes::Heap Struct Reference

#include <memory_management.h>

Collaboration diagram for hermes::Heap:

Public Attributes

ArenaErrorFuncerror_handler
 
TicketMutex mutex
 
u32 base_offset
 
u32 free_list_offset
 
u32 extent
 
u16 alignment
 
bool grows_up
 

Detailed Description

A structure to represent heap

Member Data Documentation

◆ error_handler

ArenaErrorFunc* hermes::Heap::error_handler

Function called when this Heap encounters and error

◆ mutex

TicketMutex hermes::Heap::mutex

Mutex for multi-threaded access to this Heap's members

◆ base_offset

u32 hermes::Heap::base_offset

Offset of the beginning of this heap's memory, relative to the Heap

◆ free_list_offset

u32 hermes::Heap::free_list_offset

Offset of the head of the free list, relative to base_offset

◆ extent

u32 hermes::Heap::extent

The highest (if Heap::grows_up == 1) or lowest (if Heap::grows_up == 0) used memory address of this Heap, stored as an offset from Heap::base_offset. This value is used to make sure two heaps growing in opposite directions don't overlap each other.

◆ alignment

u16 hermes::Heap::alignment

Every allocation from this Heap will result in an address aligned to this value

◆ grows_up

bool hermes::Heap::grows_up

1 if allocating new memory returns higher memory addresses, else 0


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