]>
Commit | Line | Data |
---|---|---|
c7e2187a CF |
1 | /* cygmalloc.h: cygwin DLL malloc stuff |
2 | ||
3 | Copyright 2002 Red Hat, Inc. | |
4 | ||
5 | This file is part of Cygwin. | |
6 | ||
7 | This software is a copyrighted work licensed under the terms of the | |
8 | Cygwin license. Please consult the file "CYGWIN_LICENSE" for | |
9 | details. */ | |
10 | ||
11 | extern "C" void dlfree (void *p) __attribute__ ((regparm (1))); | |
12 | extern "C" void *dlmalloc (unsigned size) __attribute__ ((regparm (1))); | |
13 | extern "C" void *dlrealloc (void *p, unsigned size) __attribute__ ((regparm (2))); | |
14 | extern "C" void *dlcalloc (size_t nmemb, size_t size) __attribute__ ((regparm (2))); | |
15 | extern "C" void *dlmemalign (size_t alignment, size_t bytes) __attribute__ ((regparm (2))); | |
16 | extern "C" void *dlvalloc (size_t bytes) __attribute__ ((regparm (1))); | |
17 | extern "C" size_t dlmalloc_usable_size (void *p) __attribute__ ((regparm (1))); | |
18 | extern "C" int dlmalloc_trim (size_t) __attribute__ ((regparm (1))); | |
19 | extern "C" int dlmallopt (int p, int v) __attribute__ ((regparm (2))); | |
20 | extern "C" void dlmalloc_stats (); | |
21 | ||
22 | #ifndef __INSIDE_CYGWIN__ | |
0428827b CF |
23 | # define USE_DL_PREFIX 1 |
24 | # define MORECORE_CANNOT_TRIM 1 | |
c7e2187a CF |
25 | #else |
26 | # define __malloc_lock() mallock->acquire () | |
27 | # define __malloc_unlock() mallock->release () | |
28 | extern muto *mallock; | |
29 | #endif |