include/mscvpdb.h: Use flexible array members for the rest of structures.
[wine.git] / include / msvcrt / malloc.h
blob359ef4578e93eaa94d12a0e9dd3091cac1b7b1be
1 /*
2 * Heap definitions
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
23 #include <corecrt.h>
24 #include <corecrt_malloc.h>
26 /* heap function constants */
27 #define _HEAPEMPTY -1
28 #define _HEAPOK -2
29 #define _HEAPBADBEGIN -3
30 #define _HEAPBADNODE -4
31 #define _HEAPEND -5
32 #define _HEAPBADPTR -6
34 #define _FREEENTRY 0
35 #define _USEDENTRY 1
37 #ifndef _HEAPINFO_DEFINED
38 #define _HEAPINFO_DEFINED
39 typedef struct _heapinfo
41 int* _pentry;
42 size_t _size;
43 int _useflag;
44 } _HEAPINFO;
45 #endif /* _HEAPINFO_DEFINED */
47 #ifdef __i386__
48 _ACRTIMP unsigned int* __cdecl __p__amblksiz(void);
49 #define _amblksiz (*__p__amblksiz());
50 #else
51 extern unsigned int _amblksiz;
52 #endif
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
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);
68 #ifdef _MSC_VER
69 void *_alloca(size_t size);
70 #endif
72 #ifdef __cplusplus
74 #endif
76 # ifdef __GNUC__
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))
81 # endif
83 #endif /* __WINE_MALLOC_H */