2002-02-02 02:00:41 +08:00
|
|
|
#include <malloc.h>
|
|
|
|
|
|
|
|
#ifdef DEFINE_MALLOC
|
2017-12-04 10:53:22 +08:00
|
|
|
void *
|
2002-02-02 02:00:41 +08:00
|
|
|
_malloc_r (struct _reent *r, size_t sz)
|
|
|
|
{
|
|
|
|
return malloc (sz);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef DEFINE_CALLOC
|
2017-12-04 10:53:22 +08:00
|
|
|
void *
|
2002-02-02 02:00:41 +08:00
|
|
|
_calloc_r (struct _reent *r, size_t a, size_t b)
|
|
|
|
{
|
|
|
|
return calloc (a, b);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef DEFINE_FREE
|
|
|
|
void
|
2017-12-04 10:53:22 +08:00
|
|
|
_free_r (struct _reent *r, void *x)
|
2002-02-02 02:00:41 +08:00
|
|
|
{
|
|
|
|
free (x);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef DEFINE_REALLOC
|
2017-12-04 10:53:22 +08:00
|
|
|
void *
|
|
|
|
_realloc_r (struct _reent *r, void *x, size_t sz)
|
2002-02-02 02:00:41 +08:00
|
|
|
{
|
|
|
|
return realloc (x, sz);
|
|
|
|
}
|
|
|
|
#endif
|