4 * Copyright 2001 Francois Gouget.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __WINE_MALLOC_H
21 #define __WINE_MALLOC_H
24 #include <corecrt_malloc.h>
26 /* heap function constants */
29 #define _HEAPBADBEGIN -3
30 #define _HEAPBADNODE -4
32 #define _HEAPBADPTR -6
37 #ifndef _HEAPINFO_DEFINED
38 #define _HEAPINFO_DEFINED
39 typedef struct _heapinfo
45 #endif /* _HEAPINFO_DEFINED */
48 _ACRTIMP
unsigned int* __cdecl
__p__amblksiz(void);
49 #define _amblksiz (*__p__amblksiz());
51 extern unsigned int _amblksiz
;
58 _ACRTIMP
int __cdecl
_heapadd(void*,size_t);
59 _ACRTIMP
int __cdecl
_heapchk(void);
60 _ACRTIMP
int __cdecl
_heapmin(void);
61 _ACRTIMP
int __cdecl
_heapset(unsigned int);
62 _ACRTIMP
size_t __cdecl
_heapused(size_t*,size_t*);
63 _ACRTIMP
int __cdecl
_heapwalk(_HEAPINFO
*);
65 _ACRTIMP
size_t __cdecl
_get_sbh_threshold(void);
66 _ACRTIMP
int __cdecl
_set_sbh_threshold(size_t size
);
69 void *_alloca(size_t size
);
77 # define _alloca(x) __builtin_alloca((x))
78 # define alloca(x) __builtin_alloca((x))
79 # elif defined(_MSC_VER)
80 # define alloca(x) _alloca((x))
83 #endif /* __WINE_MALLOC_H */