Store memory free indices as 32 bit.

More than 4 billion memory events seems unlikely.

Memory savings in "mem" trace: 5747 MB -> 5427 MB.
This commit is contained in:
Bartosz Taudul 2019-11-07 22:34:38 +01:00
parent 655864eb7c
commit 675cbc51cc

View File

@ -508,7 +508,7 @@ struct PlotData
struct MemData struct MemData
{ {
Vector<MemEvent> data; Vector<MemEvent> data;
Vector<uint64_t> frees; Vector<uint32_t> frees;
flat_hash_map<uint64_t, size_t, nohash<uint64_t>> active; flat_hash_map<uint64_t, size_t, nohash<uint64_t>> active;
uint64_t high = std::numeric_limits<uint64_t>::min(); uint64_t high = std::numeric_limits<uint64_t>::min();
uint64_t low = std::numeric_limits<uint64_t>::max(); uint64_t low = std::numeric_limits<uint64_t>::max();