Hermes  0.9.5-beta
Hierarchical Distributed I/O Buffering System
memory_management.h File Reference
#include <assert.h>
#include <atomic>
#include "hermes_types.h"
Include dependency graph for memory_management.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  hermes::TicketMutex
 
struct  hermes::Ticket
 
struct  hermes::RwLock
 
struct  hermes::ArenaInfo
 
struct  hermes::Arena
 
struct  hermes::Heap
 
struct  hermes::FreeBlockHeader
 
struct  hermes::FreeBlock
 
struct  hermes::TemporaryMemory
 
struct  hermes::ScopedTemporaryMemory
 

Namespaces

 hermes
 

Typedefs

typedef void() hermes::ArenaErrorFunc()
 

Functions

TemporaryMemory hermes::BeginTemporaryMemory (Arena *arena)
 
void hermes::EndTemporaryMemory (TemporaryMemory *temp_memory)
 
void hermes::InitArena (Arena *arena, size_t bytes, u8 *base)
 
Arena hermes::InitArenaAndAllocate (size_t bytes)
 
void hermes::DestroyArena (Arena *arena)
 
size_t hermes::GetRemainingCapacity (Arena *arena)
 
void hermes::GrowArena (Arena *arena, size_t new_size)
 The maximum capacity of arena becomes new_size. More...
 
u8 * hermes::PushSize (Arena *arena, size_t size, size_t alignment)
 
u8 * hermes::PushSizeAndClear (Arena *arena, size_t size, size_t alignment)
 
template<typename T >
T * hermes::PushStruct (Arena *arena, size_t alignment=8)
 
template<typename T >
T * hermes::PushClearedStruct (Arena *arena, size_t alignment=8)
 
template<typename T >
T * hermes::PushArray (Arena *arena, int count, size_t alignment=8)
 
template<typename T >
T * hermes::PushClearedArray (Arena *arena, int count, size_t alignment=8)
 
u8 * hermes::HeapPushSize (Heap *heap, u32 size)
 
template<typename T >
T * hermes::HeapPushStruct (Heap *heap)
 
template<typename T >
T * hermes::HeapPushArray (Heap *heap, u32 count)
 
Heap * hermes::InitHeapInArena (Arena *arena, bool grows_up, u16 alignment)
 
void hermes::HeapFree (Heap *heap, void *ptr)
 
void * hermes::HeapRealloc (Heap *heap, void *ptr, size_t size)
 
u32 hermes::GetHeapOffset (Heap *heap, u8 *ptr)
 
FreeBlock * hermes::NextFreeBlock (Heap *heap, FreeBlock *block)
 
FreeBlock * hermes::GetHeapFreeList (Heap *heap)
 
u8 * hermes::HeapOffsetToPtr (Heap *heap, u32 offset)
 
u8 * hermes::HeapExtentToPtr (Heap *heap)
 
void hermes::BeginTicketMutex (TicketMutex *mutex)
 
void hermes::EndTicketMutex (TicketMutex *mutex)
 
bool hermes::BeginReaderLock (RwLock *lock)
 
void hermes::EndReaderLock (RwLock *lock)
 
void hermes::BeginWriterLock (RwLock *lock)
 
void hermes::EndWriterLock (RwLock *lock)
 

Detailed Description

Structures for memory management.