2002-11-13 09:20:31 +08:00
|
|
|
#ifndef MALLOC_PROVIDED
|
2000-02-18 03:39:52 +08:00
|
|
|
/* valloc.c -- a wrapper for valloc_r and pvalloc_r. */
|
|
|
|
|
|
|
|
#include <_ansi.h>
|
|
|
|
#include <reent.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <malloc.h>
|
|
|
|
|
|
|
|
#ifndef _REENT_ONLY
|
|
|
|
|
2017-12-04 10:53:22 +08:00
|
|
|
void *
|
2017-12-04 11:43:30 +08:00
|
|
|
valloc (size_t nbytes)
|
2000-02-18 03:39:52 +08:00
|
|
|
{
|
|
|
|
return _valloc_r (_REENT, nbytes);
|
|
|
|
}
|
|
|
|
|
2017-12-04 10:53:22 +08:00
|
|
|
void *
|
2017-12-04 11:43:30 +08:00
|
|
|
pvalloc (size_t nbytes)
|
2000-02-18 03:39:52 +08:00
|
|
|
{
|
|
|
|
return _pvalloc_r (_REENT, nbytes);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
2002-11-13 09:20:31 +08:00
|
|
|
#endif
|