Apps
Components
Interfaces
All Files
Source Tree
source:
tos.lib.TinyAlloc.nc
Component: TinyAlloc
Required Interfaces
Leds
Provided Interfaces
StdControl
MemAlloc
void
allocDebug
(void)
Variables
uint8_t mFrame[TinyAlloc.FRAME_SIZE]
uint8_t mFree[TinyAlloc.FREE_SIZE]
int8_t mAllocing
int8_t mCompacting
int16_t mSize
int16_t mLast
Handle *mHandle
int8_t **mTmpHandle
Handle mOldHandle
int8_t *mHandles[TinyAlloc.MAX_HANDLES]
int8_t mReallocing
int8_t mCompacted
int8_t mNeedFree
int16_t mContig
int16_t mStartByte
uint16_t mFreeBytes
void doAlloc(int16_t startByte, int16_t endByte)
void shiftUp(Handle handle, int bytes)
int16_t start_offset(int8_t *ptr)
void setFreeBits(int16_t startByte, int16_t endByte, int8_t on)
void remapAddr(int8_t *oldAddr, int8_t *newAddr)
int8_t isValid(Handle h)
int8_t getSize(int8_t *p)
int8_t isLocked(int8_t *ptr)
int8_t finish_realloc(Handle *handle, int8_t success)
Handle getH(int8_t *p)
int16_t getNewHandleIdx(void)
task void compactTask(void)
task void allocTask(void)
task void reallocDone(void)
int8_t isLocked(int8_t *ptr)
Function Index
static __inline Handle
ToHandle
(int8_t *ptr)
static __inline int8_t
deref
(Handle h)
command result_t
MemAlloc.compact
(void)
command result_t
StdControl.init
(void)
command result_t
StdControl.start
(void)
command result_t
StdControl.stop
(void)
command result_t
MemAlloc.allocate
(HandlePtr handlePtr, int16_t size)
task void
allocTask
(void)
void
doAlloc
(int16_t startByte, int16_t endByte)
task void
compactTask
(void)
void
shiftUp
(Handle hand, int bytes)
command int16_t
MemAlloc.free
(Handle hand)
command result_t
MemAlloc.reallocate
(Handle hand, int16_t newSize)
task void
reallocDone
(void)
int8_t
finish_realloc
(Handle *hand, int8_t success)
command result_t
MemAlloc.lock
(Handle handle)
command result_t
MemAlloc.unlock
(Handle handle)
command bool
MemAlloc.isLocked
(Handle h)
int8_t
isLocked
(int8_t *ptr)
command int16_t
MemAlloc.size
(Handle h)
int8_t
getSize
(int8_t *ptr)
command uint16_t
MemAlloc.freeBytes
(void)
int8_t
isValid
(Handle h)
void
remapAddr
(int8_t *oldAddr, int8_t *newAddr)
Handle
getH
(int8_t *p)
int16_t
getNewHandleIdx
(void)
void
setFreeBits
(int16_t startByte, int16_t endByte, int8_t on)
int16_t
start_offset
(int8_t *ptr)
command void
allocDebug
(void)