Changeset 7728 for trunk/src/kernel32/os2heap.h
- Timestamp:
- Jan 6, 2002, 5:48:47 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/os2heap.h
r7360 r7728 1 /* $Id: os2heap.h,v 1.1 0 2001-11-16 14:52:56 phallerExp $ */1 /* $Id: os2heap.h,v 1.11 2002-01-06 16:48:47 sandervl Exp $ */ 2 2 3 3 /* … … 19 19 20 20 #define MAGIC_NR_HEAP 0x87654321 21 //must be a multiple of 8 bytes (alignment) 21 //must be a multiple of 8 bytes (alignment)!! 22 22 typedef struct _tagHEAPELEM { 23 23 DWORD magic; //magic number 24 24 LPVOID lpMem; //pointer returned by malloc 25 DWORD cursize; //current size (HeapReAlloc changes this) 26 DWORD orgsize; //size used to allocate this memory block 25 27 } HEAPELEM; 26 28 27 //+8 to make sure we can align the pointer at 8 byte boundary 28 #define HEAP_OVERHEAD (sizeof(HEAPELEM)+8) 29 #define HEAP_ALIGNMENT 8 30 #define HEAP_ALIGNMENT_MASK (~7) 31 32 #define HEAP_OVERHEAD (sizeof(HEAPELEM)) 33 34 #define HEAP_ALIGN(a) (((DWORD)a+HEAP_ALIGNMENT-1) & HEAP_ALIGNMENT_MASK) 29 35 30 36 #define GET_HEAPOBJ(ptr) (HEAPELEM *)((char *)ptr - sizeof(HEAPELEM));
Note:
See TracChangeset
for help on using the changeset viewer.