mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-01 11:53:53 -04:00
Add FreeRTOS-Plus directory.
This commit is contained in:
parent
7bd5f21ad5
commit
f508a5f653
6798 changed files with 134949 additions and 19 deletions
|
@ -0,0 +1,28 @@
|
|||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#define HEAPSIZE 0x400
|
||||
signed char *sbrk( size_t size );
|
||||
union HEAP_TYPE
|
||||
{
|
||||
signed long dummy;
|
||||
signed char heap[HEAPSIZE];
|
||||
};
|
||||
static union HEAP_TYPE heap_area;
|
||||
|
||||
/* End address allocated by sbrk */
|
||||
static signed char *brk = ( signed char * ) &heap_area;
|
||||
signed char *sbrk( size_t size )
|
||||
{
|
||||
signed char *p;
|
||||
if( brk + size > heap_area.heap + HEAPSIZE )
|
||||
{
|
||||
p = ( signed char * ) - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
p = brk;
|
||||
brk += size;
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue