Dear Daniel and Cristian,
I am Heming Cui, Prof. Junfeng Yang's student. May I ask you a question,
please? Recently I was running klee with some long running programs and
found a question about the memory usage of local variable of functions in
klee.
Please refer to the source code below (and also in the attachment).
Foo() dedclares a function local var, and the main function calls fool()
again and again. If I compile this code with llvm-gcc and run the bit
code with klee, the memory usage increases to more than 90% as soon as the
program starts and never drops. The memory in my machine is 2GB. If I
compile this code with gcc and run it natively, and the memory usage is only
0.1% and never increases.
If I change "int a[100000];" to be "int a;", the memory usage would
increase to more than 90% after about 10 seconds of start, and never drops.
It seems to me that we might need to unbind local vars in klee memory
address space after a function exits? I am a little confused of this part,
since if my program runs for a long time, this problem would happen and
affect the speed.
Memory usage of klee is 93.3%:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
COMMAND
3099 heming 20 0 1773m 469m 4 D 1.7 93.3 0:04.18 klee
Source code (also attached):
#include <stdio.h>
void foo() {
int a[100000];
return;
}
int main(int argc, char * argv[]) {
while (1) {
foo();
}
return 0;
}
--
Regards,
Heming Cui
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://keeda.Stanford.EDU/pipermail/klee-dev/attachments/20100331/82f01c46/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: islower.c
Type: application/octet-stream
Size: 150 bytes
Desc: not available
Url :
http://keeda.Stanford.EDU/pipermail/klee-dev/attachments/20100331/82f01c46/attachment.obj