Ignore:
Timestamp:
Jun 26, 2008, 9:32:47 PM (17 years ago)
Author:
[email protected]
Message:

2008-06-26 Mark Rowe <[email protected]>

Reviewed by Darin Adler and Geoff Garen.

Fix the malloc zone introspection functions so that malloc_zone_statistics does not give
bogus output in an application that uses JavaScriptCore.

  • kjs/CollectorHeapIntrospector.cpp: (KJS::CollectorHeapIntrospector::statistics): Return statistics about memory allocated by the collector.
  • kjs/CollectorHeapIntrospector.h:
  • wtf/FastMalloc.cpp: Zero out the statistics. FastMalloc doesn't track this information at present. Returning zero for all values is preferable to returning bogus data.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/FastMalloc.cpp

    r34756 r34824  
    298298    static void forceLock(malloc_zone_t*) { }
    299299    static void forceUnlock(malloc_zone_t*) { }
    300     static void statistics(malloc_zone_t*, malloc_statistics_t*) { }
     300    static void statistics(malloc_zone_t*, malloc_statistics_t* stats) { memset(stats, 0, sizeof(malloc_statistics_t)); }
    301301
    302302private:
Note: See TracChangeset for help on using the changeset viewer.