Firmwares/fpga_spn/bsp/libwrap/sys/sbrk.c
Johannes Wirth 6bfe684e73 Create separate xspn-fpga FW
Add xspn data for different accelerators
2021-03-04 11:19:35 +01:00

19 lines
357 B
C

/* See LICENSE of license details. */
#include <stddef.h>
#include "weak_under_alias.h"
void *__wrap_sbrk(ptrdiff_t incr)
{
extern char _end[];
extern char _heap_end[];
static char *curbrk = _end;
if ((curbrk + incr < _end) || (curbrk + incr > _heap_end))
return NULL - 1;
curbrk += incr;
return curbrk - incr;
}
weak_under_alias(sbrk);