Last change
on this file since 519 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
436 bytes
|
Line | |
---|
1 | #include <malloc.h> |
---|
2 | |
---|
3 | #ifdef DEFINE_MALLOC |
---|
4 | void * |
---|
5 | _malloc_r (struct _reent *r, size_t sz) |
---|
6 | { |
---|
7 | return malloc (sz); |
---|
8 | } |
---|
9 | #endif |
---|
10 | |
---|
11 | #ifdef DEFINE_CALLOC |
---|
12 | void * |
---|
13 | _calloc_r (struct _reent *r, size_t a, size_t b) |
---|
14 | { |
---|
15 | return calloc (a, b); |
---|
16 | } |
---|
17 | #endif |
---|
18 | |
---|
19 | #ifdef DEFINE_FREE |
---|
20 | void |
---|
21 | _free_r (struct _reent *r, void *x) |
---|
22 | { |
---|
23 | free (x); |
---|
24 | } |
---|
25 | #endif |
---|
26 | |
---|
27 | #ifdef DEFINE_REALLOC |
---|
28 | void * |
---|
29 | _realloc_r (struct _reent *r, void *x, size_t sz) |
---|
30 | { |
---|
31 | return realloc (x, sz); |
---|
32 | } |
---|
33 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.