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

Last change on this file since 2013 was 1678, checked in by bird, 26 years ago

Some bugsfixes - Yield is disabled.
Added parameters.
Correcte moduleheaders.
Introduced a new base class for virtual lx modules + some elf sketches.

File size: 2.3 KB
Line 
1/* $Id: malloc.h,v 1.5 1999-11-10 01:45:32 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);
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
40extern unsigned _uHeapMinPtr;/* heap pointers are greater or equal to this.*/
41extern unsigned _uHeapMaxPtr;/* heap pointers are less than this. */
42
43
44/*******************************************************************************
45* Defined Constants And Macros *
46*******************************************************************************/
47#define MINPTR _uHeapMinPtr
48#define MAXPTR _uHeapMaxPtr
49
50/* HeapPointer assert - old ones... */
51#define ltasserthp(a) if (!_validptr((void*)(a))){ _ltasserthp((void*)(a), #a,__FILE__,__LINE__); return FALSE;}
52#define ltasserthp2(a,b) if (!_validptr((void*)(a))){ _ltasserthp((void*)(a), #a,__FILE__,__LINE__); b; return FALSE;}
53#define _ltasserthp(a,b,c,d) _kprintf("ltasserthp: pv=%#.8x - '%s' in %s line %d - returns FALSE\n",a,b,c,d)
54#define ltasserthps(a,b) if (!_validptr2((void*)(a),(unsigned)(b))){ _ltasserthsp((void*)(a), (unsigned)(b), #a, #b,__FILE__,__LINE__); return FALSE;}
55#define ltasserthps2(a,b,c) if (!_validptr2((void*)(a),(unsigned)(b))){ _ltasserthsp((void*)(a), (unsigned)(b), #a, #b,__FILE__,__LINE__); c; return FALSE;}
56#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)
57
58
59/* XLATOFF */
60#ifdef __cplusplus
61}
62#endif
63#endif /* _MALLOC_H_ */
64/* XLATON */
65
Note: See TracBrowser for help on using the repository browser.