try to remove newlib dependency

This commit is contained in:
NIIBE Yutaka
2010-11-30 08:40:01 +09:00
parent 2aafb451b4
commit 35f421fc34
4 changed files with 35 additions and 20 deletions

View File

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