Ignore:
Timestamp:
Dec 13, 2001, 4:32:57 PM (24 years ago)
Author:
sandervl
Message:

added statistics

File:
1 edited

Legend:

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

    r7567 r7627  
    1 /* $Id: initkernel32.cpp,v 1.11 2001-12-07 14:13:37 sandervl Exp $
     1/* $Id: initkernel32.cpp,v 1.12 2001-12-13 15:32:34 sandervl Exp $
    22 *
    33 * KERNEL32 DLL entry point
     
    5757#include <codepage.h>
    5858#include <process.h>
     59#include <stats.h>
    5960
    6061#define DBG_LOCALLOG    DBG_initterm
     
    226227    DestroyCodeHeap();
    227228
     229#ifdef DEBUG
     230    ULONG totalmemalloc, nrcalls_malloc, nrcalls_free;
     231
     232    getcrtstat(&nrcalls_malloc, &nrcalls_free, &totalmemalloc);
     233    dprintf(("*************  KERNEL32 STATISTICS BEGIN *****************"));
     234    dprintf(("Total nr of malloc calls %d", nrcalls_malloc));
     235    dprintf(("Total nr of free   calls %d", nrcalls_free));
     236    dprintf(("Leaked memory: %d bytes", totalmemalloc));
     237    dprintf(("*************  KERNEL32 STATISTICS END   *****************"));
     238#endif
     239
    228240    //NOTE: Must be done after DestroyTIB
    229241    ClosePrivateLogFiles();
Note: See TracChangeset for help on using the changeset viewer.