libc-hooks: Make newlib's heap size configurable

While we don't have a proper heap that can make use of all the
available RAM, make it possible for applications using Newlib to
configure the size of the heap exposed via the sbrk() hook.

Change-Id: I4e3193c1f2df0ace1dbc5b1f6ceb2cdc61479762
Signed-off-by: Iván Briano <ivan.briano@intel.com>
This commit is contained in:
Iván Briano 2016-02-17 17:52:56 -02:00 committed by Gerrit Code Review
commit 428d51b5db
2 changed files with 9 additions and 1 deletions

View file

@ -18,7 +18,7 @@
#include <stdio.h>
#include <sys/stat.h>
#define HEAP_SIZE 4096
#define HEAP_SIZE CONFIG_NEWLIB_HEAP_SIZE
unsigned char heap[HEAP_SIZE];
unsigned int heap_sz;