VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/malloc.h@ 19678

Last change on this file since 19678 was 19678, checked in by vboxsync, 16 years ago

opengl: update wine to 1.1.21, add d3d9.dll to build list

  • Property svn:eol-style set to native
File size: 2.9 KB
Line 
1/*
2 * Heap definitions
3 *
4 * Copyright 2001 Francois Gouget.
5 *
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.
10 *
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.
15 *
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
19 */
20
21/*
22 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
23 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
24 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
25 * a choice of LGPL license versions is made available with the language indicating
26 * that LGPLv2 or any later version may be used, or where a choice of which version
27 * of the LGPL is applied is otherwise unspecified.
28 */
29
30#ifndef __WINE_MALLOC_H
31#define __WINE_MALLOC_H
32
33#include <crtdefs.h>
34
35/* heap function constants */
36#define _HEAPEMPTY -1
37#define _HEAPOK -2
38#define _HEAPBADBEGIN -3
39#define _HEAPBADNODE -4
40#define _HEAPEND -5
41#define _HEAPBADPTR -6
42
43#define _FREEENTRY 0
44#define _USEDENTRY 1
45
46#ifndef _HEAPINFO_DEFINED
47#define _HEAPINFO_DEFINED
48typedef struct _heapinfo
49{
50 int* _pentry;
51 size_t _size;
52 int _useflag;
53} _HEAPINFO;
54#endif /* _HEAPINFO_DEFINED */
55
56#ifdef __i386__
57extern unsigned int* __cdecl __p__amblksiz(void);
58#define _amblksiz (*__p__amblksiz());
59#else
60extern unsigned int _amblksiz;
61#endif
62
63#ifdef __cplusplus
64extern "C" {
65#endif
66
67void* __cdecl _expand(void*,size_t);
68int __cdecl _heapadd(void*,size_t);
69int __cdecl _heapchk(void);
70int __cdecl _heapmin(void);
71int __cdecl _heapset(unsigned int);
72size_t __cdecl _heapused(size_t*,size_t*);
73int __cdecl _heapwalk(_HEAPINFO*);
74size_t __cdecl _msize(void*);
75
76void* __cdecl calloc(size_t,size_t);
77void __cdecl free(void*);
78void* __cdecl malloc(size_t);
79void* __cdecl realloc(void*,size_t);
80
81void __cdecl _aligned_free(void*);
82void* __cdecl _aligned_malloc(size_t,size_t);
83void* __cdecl _aligned_offset_malloc(size_t,size_t,size_t);
84void* __cdecl _aligned_realloc(void*,size_t,size_t);
85void* __cdecl _aligned_offset_realloc(void*,size_t,size_t,size_t);
86
87size_t __cdecl _get_sbh_threshold(void);
88int __cdecl _set_sbh_threshold(size_t size);
89
90#ifdef __cplusplus
91}
92#endif
93
94# ifdef __GNUC__
95# define _alloca(x) __builtin_alloca((x))
96# define alloca(x) __builtin_alloca((x))
97# endif
98
99#endif /* __WINE_MALLOC_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette