]> cloudbase.mooo.com Git - z180-stamp.git/blame - avr/xmalloc.c
Integrate fatfs. Add some sd card test commands.
[z180-stamp.git] / avr / xmalloc.c
CommitLineData
d684c216
L
1#include <stdlib.h>
2
3#include "debug.h"
4#include "xmalloc.h"
5
6void* xmalloc(size_t size)
7{
8 void *p;
9
10 p = malloc(size);
11
12 if (p == NULL)
13 debug("*** Out of memory!\n");
14
15 return p;
16}
17
18
19void* xrealloc(void *p, size_t size)
20{
21 p = realloc(p, size);
22
23 if (p == NULL)
24 debug("*** Out of memory!\n");
25
26 return p;
27}