* 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:
Christopher Faylor 2003-02-22 23:02:15 +00:00
parent 878e60c561
commit a066f3645b
4 changed files with 25 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2003-02-22 Christopher Faylor <cgf@redhat.com>
* cygmalloc.h: Remove MORECORE_CANNOT_TRIM. It's not true.
# cygwin.din: Export mallinfo.
# malloc_wrapper.cc (mallinfo): New function.
2003-02-22 Pierre Humblet <pierre.humblet@ieee.org>
* syslog.cc (syslog): Do not print the Windows pid. Print the Cygwin

View File

@ -21,7 +21,6 @@ extern "C" void dlmalloc_stats ();
#ifndef __INSIDE_CYGWIN__
# define USE_DL_PREFIX 1
# define MORECORE_CANNOT_TRIM 1
#else
# define __malloc_lock() mallock->acquire ()
# define __malloc_unlock() mallock->release ()

View File

@ -768,6 +768,7 @@ _lseek = lseek
lseek64
lstat64
mallinfo
mallinfo
malloc
_malloc = malloc
malloc_stats

View File

@ -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)
{