[klee-dev] Reliable Memory Usage Indication
stefan.bucur at epfl.ch
Tue Aug 23 14:31:23 PDT 2011
I've recently noticed that the Klee test case
test/Feature/MemoryLimit.c intermittently fails on my machine [*]. The test
case expects that Klee would terminate the running state after a (small)
memory limit is reached. However, sometimes this did not happen, and Klee
successfully terminated without reaching the memory cap.
Therefore, I added some debug messages that outputted the memory usage
reported by the sys::Process::GetTotalMemoryUsage() invoked by Klee in
Executor::stepInState, when comparing to the MaxMemory command line
I was surprised to find that the growth rate of this value varied
significantly across multiple independent runs, supposedly equivalent. In
some runs, the growing rate was so slow that it allowed Klee to terminate
without reaching the memory limit. The reported memory usage was apparently
underestimating the actual memory usage implied by the execution of the test
case (200 MB).
Do you have knowledge about the reliability of this LLVM call? Wouldn't
perhaps be better to use a different metric (like the amount of memory
mapped in the process address space, which also shows in utilities such as
[*] I'm running Ubuntu 10.10 x64 on a quad-core machine with 20GB of RAM.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the klee-dev