Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Running Bucketizer

To run Bucketizer
  1. From Target Manager, turn on Gateway and enable the device for DES.
  2. Remove all previously installed Heap Agents (HeapDbgAgent, Heap1wrapper, heapstatisticsagent, oemnotifylistener). See Installing and Uninstalling Heap Utility Modules in the Target Manager Help.
  3. From Target Manager, launch Heap Analyzer.
  4. Click Walk Heap to install all the modules.
  5. From the Settings tab:
    1. Click Enable Heap Node Tracking and Malloc Operation.
    2. Select Enable Bucketizer.
    3. Set the total number of buckets and the bucket size. For example:

      • For two buckets:
        • Set Bucket 1 to 4040 bytes so the node size of each node of memory to be allocated ranges from 0 to 4040 bytes.
        • set Bucket 2 to 4041 bytes so the node size of each node of memory to be allocated ranges from 4041 bytes to infinity.
      • For three buckets:
        • Set Bucket 1 to 4040 bytes so the node size of each node of memory to be allocated ranges from 0 to 4040 bytes.
        • Set Bucket 2 to 8080 bytes so the node size of each node of memory to be allocated ranges from 4041 to 8080 bytes.
        • Set Bucket 3 to 8081 bytes so the node size of each node of memory to be allocated ranges from 8081 bytes to infinity.

    4. Click Set Config to save the configuration.
  6. Reset the device.
  7. Click Buckets Stat. The Bucketized Heap Stats dialog box opens.
  8. Set the frequency or use the default value of 10 seconds, and click Start. The statistical data for Bucketizer is generated in the window as shown in the following example for two buckets.

    The Buckets Stat statistical data is in bytes (except TotalAlloc and AllocHWM) and is useful in determining how to configure the split heap:

    • Bucket Size: Range of memory for each node to be allocated that fits that bucket
    • Total Alloc: Total number of nodes allocated as part of that bucket
    • Alloc HWM (High Water Mark): Highest number of nodes that have been allocated in this bucket in history.
    • Total Size: Total size of memory allocated within this bucket
    • Size HWM: Largest amount of memory used in history for that bucket