Deluge Firmware
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
MemoryRegion Class Reference

#include <MemoryRegion.h>

Collaboration diagram for MemoryRegion:
Collaboration graph

Public Member Functions

 MemoryRegion ()
 
void setup (void *emptySpacesMemory, int emptySpacesMemorySize, uint32_t regionBegin, uint32_t regionEnd)
 
void * alloc (uint32_t requiredSize, uint32_t *getAllocatedSize, bool makeStealable, void *thingNotToStealFrom, bool getBiggestAllocationPossible)
 
uint32_t shortenRight (void *address, uint32_t newSize)
 
uint32_t shortenLeft (void *address, uint32_t amountToShorten, uint32_t numBytesToMoveRightIfSuccessful=0)
 
void extend (void *address, uint32_t minAmountToExtend, uint32_t idealAmountToExtend, uint32_t *getAmountExtendedLeft, uint32_t *getAmountExtendedRight, void *thingNotToStealFrom)
 
uint32_t extendRightAsMuchAsEasilyPossible (void *spaceAddress)
 
void dealloc (void *address)
 
void verifyMemoryNotFree (void *address, uint32_t spaceSize)
 

Public Attributes

BidirectionalLinkedList stealableClusterQueues [NUM_STEALABLE_QUEUES]
 
uint32_t stealableClusterQueueLongestRuns [NUM_STEALABLE_QUEUES]
 
OrderedResizeableArrayWithMultiWordKey emptySpaces
 
int numAllocations
 
char const * name
 

Constructor & Destructor Documentation

◆ MemoryRegion()

MemoryRegion::MemoryRegion ( )

Member Function Documentation

◆ alloc()

void * MemoryRegion::alloc ( uint32_t  requiredSize,
uint32_t *  getAllocatedSize,
bool  makeStealable,
void *  thingNotToStealFrom,
bool  getBiggestAllocationPossible 
)

◆ dealloc()

void MemoryRegion::dealloc ( void *  address)

◆ extend()

void MemoryRegion::extend ( void *  address,
uint32_t  minAmountToExtend,
uint32_t  idealAmountToExtend,
uint32_t *  getAmountExtendedLeft,
uint32_t *  getAmountExtendedRight,
void *  thingNotToStealFrom 
)

◆ extendRightAsMuchAsEasilyPossible()

uint32_t MemoryRegion::extendRightAsMuchAsEasilyPossible ( void *  spaceAddress)

◆ setup()

void MemoryRegion::setup ( void *  emptySpacesMemory,
int  emptySpacesMemorySize,
uint32_t  regionBegin,
uint32_t  regionEnd 
)

◆ shortenLeft()

uint32_t MemoryRegion::shortenLeft ( void *  address,
uint32_t  amountToShorten,
uint32_t  numBytesToMoveRightIfSuccessful = 0 
)

◆ shortenRight()

uint32_t MemoryRegion::shortenRight ( void *  address,
uint32_t  newSize 
)

◆ verifyMemoryNotFree()

void MemoryRegion::verifyMemoryNotFree ( void *  address,
uint32_t  spaceSize 
)

Member Data Documentation

◆ emptySpaces

OrderedResizeableArrayWithMultiWordKey MemoryRegion::emptySpaces

◆ name

char const* MemoryRegion::name

◆ numAllocations

int MemoryRegion::numAllocations

◆ stealableClusterQueueLongestRuns

uint32_t MemoryRegion::stealableClusterQueueLongestRuns[NUM_STEALABLE_QUEUES]

◆ stealableClusterQueues

BidirectionalLinkedList MemoryRegion::stealableClusterQueues[NUM_STEALABLE_QUEUES]

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