I have a program that loads a big chunk of data at startup. That takes up a rather long time and therefore creates an overhead when running Valgrind (memcheck
)/DrMemory. So when invoking the program several times with different arguments, it takes up a considerable amount of time
My idea would be to use fork()
right after the data loading phase and then hand the children off to Valgrind/DrMemory. Even if the loading phase runs under Valgrind/DrMemory, the overhead would only occur once and all fork
ed child processes should be able to use the preloaded data from there.
Is it feasible to record a program state and declare it as untainted and then later restore that state in Valgrind (memcheck
) or DrMemory?
Note: I'm only interested in unixoid platforms, limiting it to Linux alone would also be fine.