heapred measures live glibc-visible heap-state compressibility by freezing a target process at capture times, reconstructing the live heap from an append-only committed allocation log, serializing a canonical heap stream, and compressing that stream with ZPAQ
libheapred_preload.so: C interposer loaded throughLD_PRELOAD.heapred: C++ collector CLI.
Dependencies: Linux, glibc, gcc (including g++), awk, make, and bash
make
# make test./heapred run --times 1s,2s --methods 1,4 -- ./target args
./heapred run --every 500ms --methods 4 -- ./target args
./heapred analyze run/snapshots/0001_t1.000000000 --methods 1,4
./heapred report runEach snapshot directory contains:
snapshot.jsonevents.state.jsonblocks.jsonlheap-stream.binheap-stream.sha256compression/zpaq-<method>.json
Blocks are ordered by ascending alloc_id and encoded as:
- 8-byte little-endian size
- exactly
sizepayload bytes
No pointer/address metadata is included in the canonical stream.
- Only glibc-wrapped heap allocations are measured.
- Direct
mmapperformed by the application is excluded. - Static binaries are unsupported.
- Snapshot time is the first frozen state at or after requested time (not instruction-exact).
- Compression results depend on encoding and selected compressor method.
This is free software available under the ISC License. Read the ./LICENSE file completely.