CooCox 1.1.4 on mbed with simple blinky example

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

kernelHeap.c File Reference

kernelHeap.c File Reference

kernel heap management implementation code of CooCox CoOS kernel. More...

Go to the source code of this file.

Functions

static P_FMB GetPreFMB (P_UMB usedMB)
 Get previous free memory block pointer.
void CoCreateKheap (void)
 Create kernel heap.
void * CoKmalloc (U32 size)
 Allocation size bytes of memory block from kernel heap.
void CoKfree (void *memBuf)
 Release memory block to kernel heap.

Variables

U32 KernelHeap [KHEAP_SIZE] = {0}
P_FMB FMBlist = Co_NULL
KHeap Kheap = {0}

Detailed Description

kernel heap 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 kernelHeap.c.


Function Documentation

void CoCreateKheap ( void   )

Create kernel heap.

Parameters:
[in]None
[out]None
Return values:
None
Description

This function is called to create kernel heap.

Definition at line 41 of file kernelHeap.c.

void CoKfree ( void *  memBuf )

Release memory block to kernel heap.

Parameters:
[in]memBufPointer to memory block.
[out]None
Return values:
None
Description

This function is called to release memory block.

Definition at line 182 of file kernelHeap.c.

void* CoKmalloc ( U32  size )

Allocation size bytes of memory block from kernel heap.

Parameters:
[in]sizeLength of menory block.
[out]None
Return values:
Co_NULLAllocate fail.
othersPointer to memory block.
Description

This function is called to allocation size bytes of memory block.

Definition at line 64 of file kernelHeap.c.

static P_FMB GetPreFMB ( P_UMB  usedMB ) [static]

Get previous free memory block pointer.

Parameters:
[in]usedMBCurrent used memory block.
[out]None
Return values:
Previousfree memory block pointer.
Description

This function is called to get previous free memory block pointer.

Definition at line 398 of file kernelHeap.c.


Variable Documentation

P_FMB FMBlist = Co_NULL

Free memory block list

Definition at line 24 of file kernelHeap.c.

U32 KernelHeap[KHEAP_SIZE] = {0}

Kernel heap

Definition at line 23 of file kernelHeap.c.

KHeap Kheap = {0}

Kernel heap control

Definition at line 25 of file kernelHeap.c.