1 | /* $Id: malloc.h,v 1.1.1.1 2003/07/02 13:56:58 eleph Exp $ */
|
---|
2 | /*
|
---|
3 | * Header file for simple ring 0 OS/2 heap
|
---|
4 | *
|
---|
5 | * (C) 2000-2002 InnoTek Systemberatung GmbH
|
---|
6 | *
|
---|
7 | * This program is free software; you can redistribute it and/or
|
---|
8 | * modify it under the terms of the GNU General Public License as
|
---|
9 | * published by the Free Software Foundation; either version 2 of
|
---|
10 | * the License, or (at your option) any later version.
|
---|
11 | *
|
---|
12 | * This program is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | * GNU General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU General Public
|
---|
18 | * License along with this program; if not, write to the Free
|
---|
19 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
|
---|
20 | * USA.
|
---|
21 | *
|
---|
22 | */
|
---|
23 |
|
---|
24 | #ifndef MALLOC_INCLUDED
|
---|
25 | #define MALLOC_INCLUDED
|
---|
26 |
|
---|
27 | // Standard malloc.h functions
|
---|
28 |
|
---|
29 | //NOTE: enabling this in the non-KEE driver causes problems (file name strings
|
---|
30 | // put in seperate private segments)
|
---|
31 | #ifdef DEBUGHEAP
|
---|
32 | void NEAR *malloc(unsigned size, const char *filename, int lineno);
|
---|
33 | void free(void *NEAR ptr, const char *filename, int lineno);
|
---|
34 | void NEAR *realloc(void *NEAR ptr, unsigned newsize, const char *filename, int lineno);
|
---|
35 | #else
|
---|
36 | void NEAR *malloc(unsigned);
|
---|
37 | void free(void NEAR *);
|
---|
38 | void NEAR *realloc(void NEAR *, unsigned);
|
---|
39 | #endif
|
---|
40 |
|
---|
41 | unsigned _msize(void NEAR *);
|
---|
42 |
|
---|
43 |
|
---|
44 | // // Traditional 'C' library memset() -- don't need, intrinsic function !!!
|
---|
45 | // PVOID memset ( PVOID p, int c, USHORT len );
|
---|
46 |
|
---|
47 | // Some extensions
|
---|
48 | unsigned _memfree(void); // returns available space
|
---|
49 |
|
---|
50 | // Specialized routines
|
---|
51 | unsigned HeapInit(unsigned); // initializes the heap manager
|
---|
52 | void dumpheap(void);
|
---|
53 |
|
---|
54 | BOOL IsHeapAddr(ULONG addr);
|
---|
55 |
|
---|
56 | #endif
|
---|