0xtools
0xtools copied to clipboard
make psn-embedded sqlite use a /tmp file instead of an in-memory DB
Currently sqlite uses only memory to keep track of thread samples.
This could take a noticeable amount of memory, especially when sampling all thread states, at high frequency and for a long time.
When initializing a sqlite DB/connection, configure it to use a /tmp file instead of RAM. We could make it conditional, a'la if psn is executed to sample for more than N seconds (60 seconds?), then use a file-backed sqlite DB, otherwise RAM.