CooCox 1.1.4 on mbed with simple blinky example
memory management implementation code of CooCox CoOS kernel. More...
Go to the source code of this file.
Functions | |
OS_MMID | CoCreateMemPartition (U8 *memBuf, U32 blockSize, U32 blockNum) |
Create a memory partition. | |
StatusType | CoDelMemoryPartition (OS_MMID mmID) |
Delete a memory partition. | |
U32 | CoGetFreeBlockNum (OS_MMID mmID, StatusType *perr) |
Get free block number in a memory partition. | |
void * | CoGetMemoryBuffer (OS_MMID mmID) |
Get a memory buffer from memory partition. | |
StatusType | CoFreeMemoryBuffer (OS_MMID mmID, void *buf) |
Free a memory buffer to memory partition. | |
Variables | |
MM | MemoryTbl [CFG_MAX_MM] = {{0}} |
U32 | MemoryIDVessel = 0 |
Detailed Description
memory management implementation code of CooCox CoOS kernel.
- Version:
- V1.1.4
- Date:
- 2011.04.20
INTERNAL FILE,DON'T PUBLIC.
© COPYRIGHT 2009 CooCox
Definition in file mm.c.
Function Documentation
OS_MMID CoCreateMemPartition | ( | U8 * | memBuf, |
U32 | blockSize, | ||
U32 | blockNum | ||
) |
Create a memory partition.
- Parameters:
-
[in] memBuf Specify memory partition head address. [in] blockSize Specify memory block size. [in] blockNum Specify memory block number. [out] None
- Return values:
-
E_CREATE_FAIL Create memory partition fail. others Create memory partition successful.
- Description
This function is called to create a memory partition.
StatusType CoDelMemoryPartition | ( | OS_MMID | mmID ) |
Delete a memory partition.
- Parameters:
-
[in] mmID Specify memory partition that want to delete. [out] None
- Return values:
-
E_INVALID_ID The memory partition id passed was invalid,delete fail. E_OK Delete successful.
- Description
This function is called to Delete a memory partition.
StatusType CoFreeMemoryBuffer | ( | OS_MMID | mmID, |
void * | buf | ||
) |
Free a memory buffer to memory partition.
- Parameters:
-
[in] mmID Specify memory partition. [in] buf Specify memory buffer that want to free. [out] None
- Return values:
-
E_INVALID_ID The memory partition id passed was invalid. E_INVALID_PARAMETER The parameter passed was invalid. E_OK Free successful.
- Description
This function is called to Delete a memory partition.
U32 CoGetFreeBlockNum | ( | OS_MMID | mmID, |
StatusType * | perr | ||
) |
Get free block number in a memory partition.
- Parameters:
-
[in] mmID Specify memory partition. [out] E_INVALID_ID Invalid ID was passed and get counter failure. [out] E_OK Get current counter successful.
- Return values:
-
fbNum The number of free block.
- Description
This function is called to get free block number in a memory partition.
void* CoGetMemoryBuffer | ( | OS_MMID | mmID ) |
Get a memory buffer from memory partition.
- Parameters:
-
[in] mmID Specify memory partition that want to assign buffer. [out] None
- Return values:
-
Co_NULL Assign buffer fail. others Assign buffer successful,and return the buffer pointer.
- Description
This function is called to Delete a memory partition.
Variable Documentation
U32 MemoryIDVessel = 0 |
Generated on Tue Jul 12 2022 18:19:10 by 1.7.2