source: trunk/libs/newlib/src/newlib/libc/machine/xstormy16/mallocr.c @ 519

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
4void *
5_malloc_r (struct _reent *r, size_t sz)
6{
7  return malloc (sz);
8}
9#endif
10
11#ifdef DEFINE_CALLOC
12void *
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
20void
21_free_r (struct _reent *r, void *x)
22{
23  free (x);
24}
25#endif
26
27#ifdef DEFINE_REALLOC
28void *
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.