try to remove newlib dependency
This commit is contained in:
13
src/stdlib.h
13
src/stdlib.h
@@ -4,12 +4,7 @@
|
||||
|
||||
typedef unsigned int size_t;
|
||||
|
||||
#ifdef REPLACE_MALLOC
|
||||
#define malloc my_malloc
|
||||
#define free my_free
|
||||
#define realloc my_realloc
|
||||
#endif
|
||||
|
||||
extern void *malloc (size_t size);
|
||||
extern void free (void *ptr);
|
||||
extern void *realloc (void *ptr, size_t size);
|
||||
#include "ch.h"
|
||||
#include "chheap.h"
|
||||
#define malloc(size) chHeapAlloc (NULL, size)
|
||||
#define free(p) chHeapFree (p)
|
||||
|
||||
Reference in New Issue
Block a user