Changeset 5605 for trunk/src


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

HeapReAlloc change

Location:
trunk/src/kernel32
Files:
4 edited

Legend:

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

    r5116 r5605  
    1 /* $Id: heap.cpp,v 1.25 2001-02-11 17:24:09 sandervl Exp $ */
     1/* $Id: heap.cpp,v 1.26 2001-04-27 17:35:40 sandervl Exp $ */
    22
    33/*
     
    3737
    3838  rc = curheap->Alloc(dwFlags, dwBytes);
    39   dprintf2(("HeapAlloc %X bytes -> %x", dwBytes, rc));
     39  dprintf2(("HeapAlloc %d bytes -> %x", dwBytes, rc));
    4040  return rc;
    4141}
  • trunk/src/kernel32/kernel32.mak

    r5587 r5605  
    1 # $Id: kernel32.mak,v 1.4 2001-04-26 13:22:48 sandervl Exp $
     1# $Id: kernel32.mak,v 1.5 2001-04-27 17:35:40 sandervl Exp $
    22
    33#
     
    66#       kernel32.dll makefile
    77#
     8
     9#
     10# Alternate makefile name.
     11#
     12MAKEFILE=kernel32.mak
    813
    914#
  • trunk/src/kernel32/misc.cpp

    r5347 r5605  
    1 /* $Id: misc.cpp,v 1.33 2001-03-21 12:32:55 sandervl Exp $ */
     1/* $Id: misc.cpp,v 1.34 2001-04-27 17:35:41 sandervl Exp $ */
    22
    33/*
     
    255255#if defined(DEBUG) && defined(CHECK_ODINHEAP)
    256256int checkOdinHeap = 1;
    257 #define ODIN_HEAPCHECK()    if(checkOdinHeap)   _heap_check();
     257int checkingheap = 0;
     258#define ODIN_HEAPCHECK() \
     259        if(checkingheap) checkOdinHeap = 0; \
     260        checkingheap++; \
     261        if(checkOdinHeap)   _heap_check(); \
     262        checkingheap--;
    258263#else
    259264#define ODIN_HEAPCHECK()
  • 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.