RECIDIVM(1) | RECIDIVM(1) |
NAME¶
recidivm - estimate peak virtual memory use
SYNOPSIS¶
recidivm [-c] [-p] [-v] [-u B|K|M] -- command [argument...]
DESCRIPTION¶
recidivm estimates the target program's peak virtual memory use by running it multiple times with different memory limits.
The target program must be well-behaved:
- It must be deterministic (at least with respect to memory use).
- If the memory limit is sufficient, it must terminate with exit status 0.
- If the memory limit is insufficient, it must terminate with non-zero exit status, or be terminated by a signal.
OPTIONS¶
- -c
- Capture stdin and provide fresh copy of it to every instance of the target
program.
This is the default unless stdin is a terminal.
If stdin is a terminal, the default is to redirect the target program's stdin to /dev/null.
- -p
- Don't redirect the target program's stdout or stderr.
The default is to redirect both stdout and stderr to /dev/null.
- -u B
- Use byte as the size unit. This is the default.
- -u K
- Use kilobyte (1024 bytes) as the size unit
- -u M
- Use megabyte (1048576 bytes) as the size unit.
- -v
- Print information about every call to the target program.
- -h, --help
- Show help message and exit.
EXAMPLE¶
$ gcc -m32 hello.c -o hello32 $ gcc -m64 hello.c -o hello64 $ gcc -m32 -fsanitize=address hello.c -o hello32asan $ gcc -m64 -fsanitize=address hello.c -o hello64asan $ recidivm -u M ./hello32 2 $ recidivm -u M ./hello64 4 $ recidivm -u M ./hello32asan 538 $ recidivm -u M ./hello64asan 20971587
SEE ALSO¶
2024-02-01 | recidivm 0.2.1 |