source: trunk/src/win32k/include/malloc.h@ 5087

Last change on this file since 5087 was 2511, checked in by bird, 26 years ago

Heapchanges: Heap is splitted into a swappable and a resident. The heaps
are dynamically growable.

File size: 2.2 KB
Line 
1/* $Id: malloc.h,v 1.6 2000-01-24 18:18:59 bird Exp $
2 *
3 * Heap.
4 *
5 * Note: This heap does very little checking on input.
6 * Use with care! We're running at Ring-0!
7 *
8 * Copyright (c) 1999 knut st. osmundsen
9 *
10 * Project Odin Software License can be found in LICENSE.TXT
11 *
12 */
13
14/* XLATOFF */
15#ifndef _MALLOC_H_
16#define _MALLOC_H_
17#ifdef __MALLOC_H
18 #error("A different version of malloc.h has allready been loaded!")
19#endif
20#define __malloc_h
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25/* XLATON */
26
27/*******************************************************************************
28* Exported Functions and Variables *
29*******************************************************************************/
30int heapInit(unsigned, unsigned, unsigned, unsigned);
31void * malloc(unsigned);
32void * realloc(void *, unsigned);
33void free(void *);
34unsigned _memfree(void);
35unsigned _msize(void *);
36int _validptr(void *);
37int _validptr2(void *, unsigned);
38int _heap_check(void);
39
40
41/*******************************************************************************
42* Defined Constants And Macros *
43*******************************************************************************/
44/* HeapPointer assert - old ones... */
45#define ltasserthp(a) if (!_validptr((void*)(a))){ _ltasserthp((void*)(a), #a,__FILE__,__LINE__); return FALSE;}
46#define ltasserthp2(a,b) if (!_validptr((void*)(a))){ _ltasserthp((void*)(a), #a,__FILE__,__LINE__); b; return FALSE;}
47#define _ltasserthp(a,b,c,d) _kprintf("ltasserthp: pv=%#.8x - '%s' in %s line %d - returns FALSE\n",a,b,c,d)
48#define ltasserthps(a,b) if (!_validptr2((void*)(a),(unsigned)(b))){ _ltasserthsp((void*)(a), (unsigned)(b), #a, #b,__FILE__,__LINE__); return FALSE;}
49#define ltasserthps2(a,b,c) if (!_validptr2((void*)(a),(unsigned)(b))){ _ltasserthsp((void*)(a), (unsigned)(b), #a, #b,__FILE__,__LINE__); c; return FALSE;}
50#define _ltasserthps(a,b,c,d,e,f) _kprintf("ltasserthsp: pv=%#.8x cb=%#x - '%s' '%s' in %s line %d - returns FALSE\n",a,b,c,d,e,f)
51
52
53/* XLATOFF */
54#ifdef __cplusplus
55}
56#endif
57#endif /* _MALLOC_H_ */
58/* XLATON */
59
Note: See TracBrowser for help on using the repository browser.