Software Engineering and Consulting
|
showmem
Display the stack + malloc memory allocation for a MINIX 3 program
showmem shows the current stack+malloc memory allocation for a program, without altering the program's modification timestamp; and it can be run by unprivileged users. A MINIX binary executable has a fixed amount of memory alocated for malloc and stack space. From time to time it becomes necessary to increase this value (or desirable to decrease it) for certain programs. It is often useful to check a program's current memory size to determine how much it may need to be adjusted. So, how do you do that? The traditional solution is to write a small script that does something like this: chmem +0 [path_to_some_executable] to which chmem will cheerfully respond with something like: [path_to_some_executable]: Stack+malloc area changed from 16384 to 16384 bytes. Fine, that tells you what you wanted to know. So what's wrong with that?
showmem does not have these limitations. It only reads the file, and can be run by any user. It was originally written because I needed something like it to use in the build script for my FVWM port . This package has been tested under both MINIX 3.1.2a and 3.1.3a
Instructions:
Download showmem-1.0.0.tar.bz2 (6894 bytes) (The core of the program, of course, is cheerfully stolen from Andy Tanenbaum's chmem . Any new bugs, however, are my own original work!)
|