source: trunk/src/win32k/include/rmalloc.h

Last change on this file was 4164, checked in by bird, 25 years ago

Merged in the Grace branch. New Win32k!

File size: 2.0 KB
RevLine 
[4164]1/* $Id: rmalloc.h,v 1.3 2000-09-02 21:08:04 bird Exp $
[2502]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 */
[4164]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;
[2502]33
[4164]34
[2502]35/*******************************************************************************
36* Exported Functions and Variables *
37*******************************************************************************/
[2506]38int resHeapInit(unsigned, unsigned);
[2502]39void * rmalloc(unsigned);
40void * rrealloc(void *, unsigned);
41void rfree(void *);
42
43unsigned _res_msize(void *);
44int _res_validptr(void *);
45int _res_validptr2(void *, unsigned);
46unsigned _res_memfree(void);
[4164]47unsigned _res_memused(void);
48int _res_state(PHEAPSTATE);
[2502]49int _res_heap_check(void);
50void _res_heapmin(void);
51void _res_dump_subheaps(void);
52void _res_dump_allocated(unsigned);
53
[4164]54extern unsigned cbResHeapMax; /* Maximum amount of memory used by the heap. */
55
56
[2502]57/* XLATOFF */
58#ifdef __cplusplus
59}
60#endif
61#endif /* _MALLOC_H_ */
62/* XLATON */
63
Note: See TracBrowser for help on using the repository browser.