RainbowBS Manual
v0.1.0
Written by QWQ([email protected])
|
Macros | |
#define | HDMM_NULL NULL |
#define | HBLOCK_NULL NULL |
#define | HMEM_NULL NULL |
Typedefs | |
typedef void * | hDMM |
typedef void * | hBLOCK |
typedef void * | hMEM |
Functions | |
hDMM | RBS_DMM_RegisterBlock (char *pName, void *pDM, USIZE size, USIZE block_size, HMUTEX hMutex) |
Register the memory area as a dynamic block memory area. More... | |
hBLOCK | RBS_DMM_AllocZeroBlock (hDMM hDmm) |
Allocate a free block with zero initialization from the dynamic block memory area. More... | |
hBLOCK | RBS_DMM_AllocBlock (hDMM hDmm) |
Allocate a free block from the dynamic block memory area. More... | |
BOOL | RBS_DMM_FreeBlock (hBLOCK hBlock) |
Free the allocated block. More... | |
void * | RBS_DMM_UseHBlock (hBLOCK hBlock) |
Get the allocated block pointer. More... | |
BOOL | RBS_DMM_UnuseHBlock (hBLOCK hBlock) |
Unuse the allocated block area. More... | |
hDMM | RBS_DMM_RegisterPool (char *pName, void *pDM, USIZE size, BOOL bAntiFrag, U16 handle_count, HMUTEX hMutex) |
Register the memory area as a dynamic pool memory area. More... | |
hMEM | RBS_DMM_AllocZeroMem (hDMM hDmm, USIZE size) |
Allocate a free memory with zero initialization from the dynamic memory area. More... | |
hMEM | RBS_DMM_AllocMem (hDMM hDmm, USIZE size) |
Allocate a free memory from the dynamic memory area. More... | |
hMEM | RBS_DMM_ReallocMem (hMEM hMem, USIZE size) |
Reallocate a free memory from the same dynamic memory area. More... | |
BOOL | RBS_DMM_FreeMem (hMEM hMem) |
Free the allocated memory. More... | |
void * | RBS_DMM_UseHMem (hMEM hMem) |
Get the allocated memory pointer. More... | |
BOOL | RBS_DMM_UnuseHMem (hMEM hMem) |
Unuse the allocated memory area. More... | |
USIZE | RBS_DMM_GetHMemSize (hMEM hMem) |
Get the allocated memory size. More... | |
Detailed Description
Dynamic memory management for both memory poll and block.
Function Documentation
hBLOCK RBS_DMM_AllocBlock | ( | hDMM | hDmm | ) |
- Parameters
-
[in] hDmm handle of dynamic block memory area.
- Return values
-
HBLOCK_NULL failed. others handle of dynamic memory area.
Here is the call graph for this function:
Here is the caller graph for this function:
hMEM RBS_DMM_AllocMem | ( | hDMM | hDmm, |
USIZE | size | ||
) |
- Parameters
-
[in] hDmm handle of dynamic memory area. [in] size memory area bytes.
- Return values
-
HMEM_NULL failed. others handle of dynamic memory area.
Here is the call graph for this function:
Here is the caller graph for this function:
hBLOCK RBS_DMM_AllocZeroBlock | ( | hDMM | hDmm | ) |
- Parameters
-
[in] hDmm handle of dynamic block memory area.
- Return values
-
HBLOCK_NULL failed. others handle of dynamic memory area.
Here is the call graph for this function:
hMEM RBS_DMM_AllocZeroMem | ( | hDMM | hDmm, |
USIZE | size | ||
) |
- Parameters
-
[in] hDmm handle of dynamic memory area. [in] size memory area bytes.
- Return values
-
HMEM_NULL failed. others handle of dynamic memory area.
Here is the call graph for this function:
BOOL RBS_DMM_FreeBlock | ( | hBLOCK | hBlock | ) |
- Parameters
-
[in] hBlock handle of a allocated block.
- Return values
-
TRUE successful. FALSE failed.
Here is the call graph for this function:
BOOL RBS_DMM_FreeMem | ( | hMEM | hMem | ) |
- Parameters
-
[in] hMem handle of a allocated memory.
- Return values
-
TRUE successful. FALSE failed.
Here is the call graph for this function:
USIZE RBS_DMM_GetHMemSize | ( | hMEM | hMem | ) |
- Parameters
-
[in] hMem handle of the allocated memory.
- Returns
- memory area size.
Here is the call graph for this function:
hMEM RBS_DMM_ReallocMem | ( | hMEM | hMem, |
USIZE | size | ||
) |
- Parameters
-
[in] hMem handle of an allocated memory. [in] size memory area bytes.
- Return values
-
HMEM_NULL failed. others handle of dynamic memory area.
Here is the call graph for this function:
hDMM RBS_DMM_RegisterBlock | ( | char * | pName, |
void * | pDM, | ||
USIZE | size, | ||
USIZE | block_size, | ||
HMUTEX | hMutex | ||
) |
- Parameters
-
[in] pName block memory name. [in] pDM pointer to the block memory area. [in] size block memory area size(bytes). [in] block_size each block size. [in] hMutex memory block mutex for thread-safe.If NULL,no thread-safe support.
- Return values
-
HDMM_NULL failed. other handle of dynamic block memory area.
Here is the call graph for this function:
Here is the caller graph for this function:
hDMM RBS_DMM_RegisterPool | ( | char * | pName, |
void * | pDM, | ||
USIZE | size, | ||
BOOL | bAntiFrag, | ||
U16 | handle_count, | ||
HMUTEX | hMutex | ||
) |
- Parameters
-
[in] pName memory pool name. [in] pDM pointer to the memory area. [in] size memory area size(bytes). [in] bAntiFrag enable defragmentation. [in] handle_count count of memory handles. [in] hMutex memory pool mutex for thread-safety.If NULL,no thread-safe support.
- Return values
-
Not HDMM_NULL successful. HDMM_NULL failed.
Here is the call graph for this function:
Here is the caller graph for this function:
BOOL RBS_DMM_UnuseHBlock | ( | hBLOCK | hBlock | ) |
- Parameters
-
[in] hBlock handle of a allocated block.
- Returns
- block area pointer.
- See also
- RBS_DMM_UseHBlock()
- Note
- used in pair with RBS_DMM_UseHBlock()
Here is the call graph for this function:
Here is the caller graph for this function:
BOOL RBS_DMM_UnuseHMem | ( | hMEM | hMem | ) |
- Parameters
-
[in] hMem handle of a allocated memory.
- Returns
- memory area pointer.
- See also
- RBS_DMM_UseHMem()
- Note
- used in pair with RBS_DMM_UseHMem()
Here is the call graph for this function:
Here is the caller graph for this function:
void* RBS_DMM_UseHBlock | ( | hBLOCK | hBlock | ) |
- Parameters
-
[in] hBlock handle of a allocated block.
- Returns
- block area pointer.
- See also
- RBS_DMM_UnuseHBlock()
- Note
- used in pair with RBS_DMM_UnuseHBlock()
Here is the call graph for this function:
Here is the caller graph for this function:
void* RBS_DMM_UseHMem | ( | hMEM | hMem | ) |
- Parameters
-
[in] hMem handle of a allocated memory.
- Returns
- memory area pointer.
- See also
- RBS_DMM_UnuseHMem()
- Note
- used in pair with RBS_DMM_UnuseHMem()
Here is the call graph for this function:
Here is the caller graph for this function:
Generated by 1.8.9.1