Changeset 6184 for trunk/src/kernel32/os2heap.h
- Timestamp:
- Jul 6, 2001, 3:47:19 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/os2heap.h
r1118 r6184 1 /* $Id: os2heap.h,v 1. 4 1999-10-04 09:55:57sandervl Exp $ */1 /* $Id: os2heap.h,v 1.5 2001-07-06 13:47:19 sandervl Exp $ */ 2 2 3 3 /* … … 18 18 19 19 #define MAGIC_NR_HEAP 0x87654321 20 //must be a multiple of 8 bytes (alignment) 20 21 typedef struct _tagHEAPELEM { 21 22 DWORD magic; //magic number 23 LPVOID lpMem; //pointer returned by malloc 22 24 struct _tagHEAPELEM *prev; 23 25 struct _tagHEAPELEM *next; 24 DWORD flags; //set by LocalAlloc only25 DWORD lockCnt; //LocalLock/Unlock26 26 } HEAPELEM; 27 27 28 #define HEAP_OVERHEAD (sizeof(HEAPELEM)+60) 29 //#define HEAP_OVERHEAD sizeof(HEAPELEM) 28 //extra overhead needed for quake 2 or 3 (a long time ago...) 29 //#define HEAP_OVERHEAD (sizeof(HEAPELEM)+60) 30 //+8 to make sure we can align the pointer at 8 byte boundary 31 #define HEAP_OVERHEAD (sizeof(HEAPELEM)+8) 32 33 #define GET_HEAPOBJ(ptr) (HEAPELEM *)((char *)ptr - sizeof(HEAPELEM)); 30 34 31 35 class OS2Heap … … 44 48 BOOL Validate(DWORD dwFlags, LPCVOID lpMem); 45 49 BOOL Walk(void *lpEntry); 46 47 LPVOID Alloc(DWORD dwFlags, DWORD dwBytes, DWORD LocalAllocFlags);48 BOOL Lock(LPVOID lpMem);49 BOOL Unlock(LPVOID lpMem);50 int GetLockCnt(LPVOID lpMem);51 DWORD GetFlags(LPVOID lpMem);52 50 53 51 static OS2Heap *find(HANDLE hHeap);
Note:
See TracChangeset
for help on using the changeset viewer.