Ignore:
Timestamp:
Jul 6, 2001, 3:47:19 PM (24 years ago)
Author:
sandervl
Message:

heap updates/fixes

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:57 sandervl Exp $ */
     1/* $Id: os2heap.h,v 1.5 2001-07-06 13:47:19 sandervl Exp $ */
    22
    33/*
     
    1818
    1919#define MAGIC_NR_HEAP  0x87654321
     20//must be a multiple of 8 bytes (alignment)
    2021typedef struct _tagHEAPELEM {
    2122  DWORD  magic;     //magic number
     23  LPVOID lpMem;     //pointer returned by malloc
    2224  struct _tagHEAPELEM *prev;
    2325  struct _tagHEAPELEM *next;
    24   DWORD  flags;     //set by LocalAlloc only
    25   DWORD  lockCnt;   //LocalLock/Unlock
    2626} HEAPELEM;
    2727
    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));
    3034
    3135class OS2Heap
     
    4448    BOOL   Validate(DWORD dwFlags, LPCVOID lpMem);
    4549    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);
    5250
    5351   static OS2Heap *find(HANDLE hHeap);
Note: See TracChangeset for help on using the changeset viewer.