port to chopstx

This commit is contained in:
NIIBE Yutaka
2013-06-20 16:19:49 +09:00
parent 7c01cae4a5
commit ee7d72743e
30 changed files with 1349 additions and 759 deletions

View File

@@ -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 *);