port to chopstx
This commit is contained in:
13
src/stdlib.h
13
src/stdlib.h
@@ -1,10 +1,13 @@
|
||||
/*
|
||||
* stdlib.h replacement, so that we can replace malloc functions
|
||||
* stdlib.h replacement to replace malloc functions
|
||||
*/
|
||||
|
||||
typedef unsigned int size_t;
|
||||
|
||||
#include "ch.h"
|
||||
#include "chheap.h"
|
||||
#define malloc(size) chHeapAlloc (NULL, size)
|
||||
#define free(p) chHeapFree (p)
|
||||
#include <stddef.h> /* NULL */
|
||||
|
||||
#define malloc(size) gnuk_malloc (size)
|
||||
#define free(p) gnuk_free (p)
|
||||
|
||||
void *gnuk_malloc (size_t);
|
||||
void gnuk_free (void *);
|
||||
|
||||
Reference in New Issue
Block a user