* cygmalloc.h: Remove MORECORE_CANNOT_TRIM. It's not true. # cygwin.din:
Export mallinfo. # malloc_wrapper.cc (mallinfo): New function.
This commit is contained in:
@ -25,6 +25,8 @@ details. */
|
||||
#include "sync.h"
|
||||
#include "perprocess.h"
|
||||
#include "cygmalloc.h"
|
||||
#include <malloc.h>
|
||||
extern "C" struct mallinfo dlmallinfo ();
|
||||
|
||||
/* we provide these stubs to call into a user's
|
||||
provided malloc if there is one - otherwise
|
||||
@ -276,6 +278,22 @@ malloc_stats ()
|
||||
return;
|
||||
}
|
||||
|
||||
extern "C" struct mallinfo
|
||||
mallinfo ()
|
||||
{
|
||||
struct mallinfo m;
|
||||
if (!use_internal_malloc)
|
||||
set_errno (ENOSYS);
|
||||
else
|
||||
{
|
||||
__malloc_lock ();
|
||||
m = dlmallinfo ();
|
||||
__malloc_unlock ();
|
||||
}
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
extern "C" char *
|
||||
strdup (const char *s)
|
||||
{
|
||||
|
Reference in New Issue
Block a user