* 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:
parent
878e60c561
commit
a066f3645b
|
@ -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>
|
2003-02-22 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
* syslog.cc (syslog): Do not print the Windows pid. Print the Cygwin
|
* syslog.cc (syslog): Do not print the Windows pid. Print the Cygwin
|
||||||
|
|
|
@ -21,7 +21,6 @@ extern "C" void dlmalloc_stats ();
|
||||||
|
|
||||||
#ifndef __INSIDE_CYGWIN__
|
#ifndef __INSIDE_CYGWIN__
|
||||||
# define USE_DL_PREFIX 1
|
# define USE_DL_PREFIX 1
|
||||||
# define MORECORE_CANNOT_TRIM 1
|
|
||||||
#else
|
#else
|
||||||
# define __malloc_lock() mallock->acquire ()
|
# define __malloc_lock() mallock->acquire ()
|
||||||
# define __malloc_unlock() mallock->release ()
|
# define __malloc_unlock() mallock->release ()
|
||||||
|
|
|
@ -768,6 +768,7 @@ _lseek = lseek
|
||||||
lseek64
|
lseek64
|
||||||
lstat64
|
lstat64
|
||||||
mallinfo
|
mallinfo
|
||||||
|
mallinfo
|
||||||
malloc
|
malloc
|
||||||
_malloc = malloc
|
_malloc = malloc
|
||||||
malloc_stats
|
malloc_stats
|
||||||
|
|
|
@ -25,6 +25,8 @@ details. */
|
||||||
#include "sync.h"
|
#include "sync.h"
|
||||||
#include "perprocess.h"
|
#include "perprocess.h"
|
||||||
#include "cygmalloc.h"
|
#include "cygmalloc.h"
|
||||||
|
#include <malloc.h>
|
||||||
|
extern "C" struct mallinfo dlmallinfo ();
|
||||||
|
|
||||||
/* we provide these stubs to call into a user's
|
/* we provide these stubs to call into a user's
|
||||||
provided malloc if there is one - otherwise
|
provided malloc if there is one - otherwise
|
||||||
|
@ -276,6 +278,22 @@ malloc_stats ()
|
||||||
return;
|
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 *
|
extern "C" char *
|
||||||
strdup (const char *s)
|
strdup (const char *s)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue