Ignore:
Timestamp:
Apr 27, 2001, 7:35:41 PM (24 years ago)
Author:
sandervl
Message:

HeapReAlloc change

File:
1 edited

Legend:

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

    r5308 r5605  
    1 /* $Id: os2heap.cpp,v 1.16 2001-03-13 18:45:33 sandervl Exp $ */
     1/* $Id: os2heap.cpp,v 1.17 2001-04-27 17:35:41 sandervl Exp $ */
    22
    33/*
     
    300300
    301301  oldSize = Size(0,lpMem);
    302   if (oldSize == dwBytes) return lpMem; // if reallocation with same size
    303                                         // don't do anything
     302  if (oldSize >= dwBytes) {
     303       dprintf(("ReAlloc with smaller size than original (%d); return old pointer", oldSize));
     304       return lpMem; // if reallocation with same size don't do anything
     305  }
    304306  lpNewMem = Alloc(dwFlags, dwBytes);
    305307  memcpy(lpNewMem, lpMem, dwBytes < oldSize ? dwBytes : oldSize);
Note: See TracChangeset for help on using the changeset viewer.