2002-11-13 01:20:31 +00:00
|
|
|
#ifndef MALLOC_PROVIDED
|
2000-02-17 19:39:52 +00: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-03 20:53:22 -06:00
|
|
|
void *
|
2017-12-03 21:43:30 -06:00
|
|
|
valloc (size_t nbytes)
|
2000-02-17 19:39:52 +00:00
|
|
|
{
|
|
|
|
return _valloc_r (_REENT, nbytes);
|
|
|
|
}
|
|
|
|
|
2017-12-03 20:53:22 -06:00
|
|
|
void *
|
2017-12-03 21:43:30 -06:00
|
|
|
pvalloc (size_t nbytes)
|
2000-02-17 19:39:52 +00:00
|
|
|
{
|
|
|
|
return _pvalloc_r (_REENT, nbytes);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
2002-11-13 01:20:31 +00:00
|
|
|
#endif
|