Browse Prior Art Database

Computer Method to Profile Location and Size of Heap Operations

IP.com Disclosure Number: IPCOM000123215D
Original Publication Date: 1998-Jul-01
Included in the Prior Art Database: 2005-Apr-04
Document File: 1 page(s) / 50K

Publishing Venue

IBM

Related People

Benayon, JW: AUTHOR

Abstract

Runtime performance can often be improved by pooling heap objects to reduce the effort of coalescing of freed objects. However, the identification of the exact object sizes and location of the operations within the application are difficult to determine using currently available tools.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Computer Method to Profile Location and Size of Heap Operations

   Runtime performance can often be improved by pooling
heap objects to reduce the effort of coalescing of freed objects.
However, the identification of the exact object sizes and location of
the operations within the application are difficult to determine
using currently available tools.

   An implementation that wraps the basic heap operations
malloc, free, calloc and realloc, and  where the calling procedures
in the stack frame are saved with the object size within a runtime
lookup table can provide the necessary statistics to identify heap
hot spots within an application.

   A table to collect the procedure names and operations
performed is created during runtime initialization using operating
system services.  If user defined heaps are available, then a
private runtime heap can be used to manage this and other necessary
internal tables.  This table is stored in sorted order to simplify
searching for each heap operation and uses the procedures address of
the function that required the heap operation as an index to the
table.  On each heap operation the position in the lookup table is
determined and the operation type counter is incremented within the
record.

   Function table:
                 total  calloc()  malloc()  realloc()  free()
  FunctionAddr   calls   calls     calls      calls     calls
  ------------   -----  --------  --------  ---------  ------
   0x12345678     21     ...