source: trunk/src/win32k/kKrnlLib/include/kKLrmalloc.h

Last change on this file was 6701, checked in by bird, 24 years ago

Further progress. More CLib stuff.

File size: 1.9 KB
Line 
1/* $Id: kKLrmalloc.h,v 1.1 2001-09-14 01:50:18 bird Exp $
2 *
3 * Resident 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-2000 knut st. osmundsen
9 *
10 * Project Odin Software License can be found in LICENSE.TXT
11 *
12 */
13
14/* XLATOFF */
15#ifndef _RMALLOC_H_
16#define _RMALLOC_H_
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21/* XLATON */
22/*******************************************************************************
23* Structures and Typedefs *
24*******************************************************************************/
25typedef struct HeapState_s /* note: this is used by both swappable and resident heaps */
26{
27 ULONG cbHeapSize; /* Amount of memory used by the heap free and used++. */
28 ULONG cbHeapFree; /* Amount of used space. */
29 ULONG cbHeapUsed; /* Amount of free space reserved. */
30 ULONG cBlocksUsed; /* Count of used blocks. */
31 ULONG cBlocksFree; /* Count of free blocks. */
32} HEAPSTATE, *PHEAPSTATE;
33
34
35/*******************************************************************************
36* Exported Functions and Variables *
37*******************************************************************************/
38int resHeapInit(unsigned, unsigned);
39void * rmalloc(unsigned);
40void * rrealloc(void *, unsigned);
41void rfree(void *);
42
43unsigned _res_msize(void *);
44unsigned _res_memfree(void);
45unsigned _res_memused(void);
46int _res_state(PHEAPSTATE);
47int _res_heap_check(void);
48void _res_heapmin(void);
49void _res_dump_subheaps(void);
50void _res_dump_allocated(unsigned);
51
52extern unsigned cbResHeapMax; /* Maximum amount of memory used by the heap. */
53
54
55/* XLATOFF */
56#ifdef __cplusplus
57}
58#endif
59#endif /* _MALLOC_H_ */
60/* XLATON */
61
Note: See TracBrowser for help on using the repository browser.