Ignore:
Timestamp:
Nov 16, 2001, 1:57:01 PM (24 years ago)
Author:
phaller
Message:

Heap acceleration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/os2heap.cpp

    r7156 r7358  
    1 /* $Id: os2heap.cpp,v 1.29 2001-10-22 23:28:11 phaller Exp $ */
     1/* $Id: os2heap.cpp,v 1.30 2001-11-16 12:57:00 phaller Exp $ */
    22
    33/*
     
    5050//******************************************************************************
    5151
    52 //static int fhhm_hit = 0;
    53 //static int fhhm_miss = 0;
    54 static HANDLE   fhhm_lastHandle = 0;
    55 static OS2Heap* fhhm_lastHeap   = NULL;
     52HANDLE   fhhm_lastHandle = 0;
     53OS2Heap* fhhm_lastHeap   = NULL;
    5654
    5755
     
    237235  HEAPELEM *helem = GET_HEAPOBJ(lpMem);
    238236
    239   if(lpMem == NULL) {
    240         dprintf(("OS2Heap::Free lpMem == NULL\n"));
    241         return(FALSE);
    242   }
    243237  /* verify lpMem address */
    244238  if (lpMem >= (LPVOID)ulMaxAddr || lpMem < (LPVOID)0x10000)
     
    307301OS2Heap *OS2Heap::find(HANDLE hHeap)
    308302{
    309   // check against cache first
    310   if (fhhm_lastHeap)
    311     if (hHeap == fhhm_lastHandle)
    312     {
    313 //      fhhm_hit++;
    314       return fhhm_lastHeap;
    315     }
    316   
    317 //  fhhm_miss++;
    318   
     303/* PH moved to inlineable macro ...
     304 *  // check against cache first
     305 * if (fhhm_lastHeap)
     306 *   if (hHeap == fhhm_lastHandle)
     307 *   {
     308 *     return fhhm_lastHeap;
     309 *   }
     310 *
     311 */
     312 
    319313  OS2Heap *curheap = OS2Heap::heap;
    320314 
Note: See TracChangeset for help on using the changeset viewer.