mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Remove syscalls.c
This commit is contained in:
parent
770d0b156b
commit
659ffc73cc
@ -1,28 +0,0 @@
|
|||||||
#include <errno.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/times.h>
|
|
||||||
/**
|
|
||||||
* Override _sbrk.
|
|
||||||
* uses the whole main RAM block (128KB) for heap.
|
|
||||||
*/
|
|
||||||
caddr_t _sbrk(int incr) {
|
|
||||||
extern char _heap_start; // Defined by the linker
|
|
||||||
extern char _heap_end; // Defined by the linker
|
|
||||||
static char *heap_end;
|
|
||||||
char *prev_heap_end;
|
|
||||||
|
|
||||||
if (heap_end == 0) {
|
|
||||||
heap_end = &_heap_start;
|
|
||||||
}
|
|
||||||
prev_heap_end = heap_end;
|
|
||||||
|
|
||||||
if (heap_end + incr > &_heap_end) {
|
|
||||||
errno = ENOMEM;
|
|
||||||
return (caddr_t) - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
heap_end += incr;
|
|
||||||
return (caddr_t) prev_heap_end;
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user