1 /* cygmalloc.h: cygwin DLL malloc stuff
3 This file is part of Cygwin.
5 This software is a copyrighted work licensed under the terms of the
6 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
13 void dlfree (void *p
);
14 void *dlmalloc (size_t size
);
15 void *dlrealloc (void *p
, size_t size
);
16 void *dlcalloc (size_t nmemb
, size_t size
);
17 void *dlmemalign (size_t alignment
, size_t bytes
);
18 void *dlvalloc (size_t bytes
);
19 size_t dlmalloc_usable_size (void *p
);
20 int dlmalloc_trim (size_t);
21 int dlmallopt (int p
, int v
);
22 void dlmalloc_stats ();
24 #define MALLOC_ALIGNMENT ((size_t)16U)
26 #if defined (DLMALLOC_VERSION) /* Building malloc.cc */
28 extern "C" void __set_ENOMEM ();
29 # define MALLOC_FAILURE_ACTION __set_ENOMEM ()
30 # define USE_DL_PREFIX 1
32 #elif defined (__INSIDE_CYGWIN__)
34 # define __malloc_lock() AcquireSRWLockExclusive (&mallock)
35 # define __malloc_unlock() ReleaseSRWLockExclusive (&mallock)
36 extern SRWLOCK NO_COPY mallock
;