Skip to content
Commit cc5a6163 authored by Vedant Kumar's avatar Vedant Kumar
Browse files

[IRMemoryMap] Test interleaved Mallocs and Frees

This adds a new command to the ir-memory-map tester:

  free <allocation-index>

The argument to free is an index which identifies which live allocation
to free. Index 0 identifies the first live allocation in the address
space, index 1 identifies the second, etc. where the allocations are
sorted in increasing order.

For illustrative purposes, assume malloc returns monotonically
increasing addresses. Here are some examples of how free would work:

Example 1
---------

malloc 16 1
malloc 32 1
free 1      //< Free the 32-byte allocation.
free 0      //< Next, free the 16-byte allocation.

Example 2
---------

malloc 16 1
malloc 32 1
free 0      //< Free the 16-byte allocation.
free 0      //< Next, free the 32-byte allocation.

llvm-svn: 333700
parent 7e4c84a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment