update for HEAD-2002110701
[reactos.git] / include / crtdll / alloc.h
1 /*
2  * alloc.h
3  *
4  * Memory management functions. Because most of these functions are
5  * actually declared in stdlib.h I have decided to simply include that
6  * header file. This file is included by malloc.h. My head hurts...
7  *
8  * NOTE: In the version of the Standard C++ Library from Cygnus there
9  * is also an alloc.h which needs to be on your include path. Most of
10  * the time I think the most sensible option would be to get rid of
11  * this file.
12  *
13  * This file is part of the Mingw32 package.
14  *
15  * Contributors:
16  *  Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
17  *
18  *  THIS SOFTWARE IS NOT COPYRIGHTED
19  *
20  *  This source code is offered for use in the public domain. You may
21  *  use, modify or distribute it freely.
22  *
23  *  This code is distributed in the hope that it will be useful but
24  *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
25  *  DISCLAMED. This includes but is not limited to warranties of
26  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27  *
28  * $Revision$
29  * $Author$
30  * $Date$
31  *
32  */
33
34 #ifndef __STRICT_ANSI__
35
36 #ifndef _ALLOC_H_
37 #define _ALLOC_H_
38
39 #include <crtdll/stdlib.h>
40
41 #ifndef RC_INVOKED
42
43 #ifdef  __cplusplus
44 extern "C" {
45 #endif
46
47 /*
48  * The structure used to walk through the heap with _heapwalk.
49  * TODO: This is a guess at the internals of this structure.
50  */
51 typedef struct _heapinfo
52 {
53         void*           ptr;
54         unsigned int    size;
55         int             in_use;
56 } _HEAPINFO;
57
58 int     _heapwalk (_HEAPINFO* pHeapinfo);
59 void  * _alloca(size_t size);
60
61
62
63 #ifndef _NO_OLDNAMES
64 #define heapwalk(x)     _heapwalk(x)
65 #define alloca(s)       _alloca(s)
66 #endif  /* Not _NO_OLDNAMES */
67
68 #ifdef  __cplusplus
69 }
70 #endif
71
72 #endif  /* Not RC_INVOKED */
73
74 #endif  /* Not _ALLOC_H_ */
75
76 #endif  /* Not __STRICT_ANSI__ */
77