Changeset 6080 for trunk/src/kernel32/os2heap.cpp
- Timestamp:
- Jun 23, 2001, 10:43:17 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/os2heap.cpp
r5605 r6080 1 /* $Id: os2heap.cpp,v 1.1 7 2001-04-27 17:35:41sandervl Exp $ */1 /* $Id: os2heap.cpp,v 1.18 2001-06-23 08:43:17 sandervl Exp $ */ 2 2 3 3 /* … … 272 272 DWORD OS2Heap::Size(DWORD dwFlags, PVOID lpMem) 273 273 { 274 // dprintf(("OS2Heap::Size, %X\n", lpMem)); 275 if(lpMem == NULL) 276 return(0); 274 HEAPELEM *helem = (HEAPELEM *)((char *)lpMem - sizeof(HEAPELEM)); 275 276 if(lpMem == NULL) { 277 dprintf(("OS2Heap::Size lpMem == NULL\n")); 278 return -1; 279 } 280 /* verify lpMem address */ 281 if (lpMem >= (LPVOID)ulMaxAddr || lpMem < (LPVOID)0x10000) 282 { 283 dprintf(("OS2Heap::Size ERROR BAD HEAP POINTER:%X\n", lpMem)); 284 return -1; 285 } 286 287 if(helem->magic != MAGIC_NR_HEAP) 288 { 289 dprintf(("OS2Heap::Size ERROR BAD HEAP POINTER:%X\n", lpMem)); 290 return -1; 291 } 277 292 278 293 return(_msize((char *)lpMem - sizeof(HEAPELEM)) - HEAP_OVERHEAD);
Note:
See TracChangeset
for help on using the changeset viewer.