RECIDIVM(1)

πŸ“¦ version 0.2.1, in opensuse-leap 16.0

✨ NAME ✨

recidivm β€” estimate peak virtual memory use πŸ’…

Okay bestie, so recidivm is the little icon that estimates the target program's peak virtual memory use by running it multiple times with different memory limits. It's literally giving measurement-by-vibe-check, except the vibes are memory limits. 🫢

🌸 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, no cap:

  • 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 πŸ”₯

Here's the group-chat demo, fr fr:

$ 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 πŸ¦‹

setrlimit(2) β€” that's the reference bestie. πŸ’œ

πŸ’– That's the whole page, bestie β€” recidivm 0.2.1, dated 2024-02-01. Mwah! πŸ’–

πŸ“¦ where this page comes from