run-with-memusage
Manual Reference Pages - RUN-WITH-MEMUSAGE (1)
NAME
run-with-memusage - run Maemo applications under memusage
CONTENTS
Synopsis
Description
Examples
Files
See Also
Copyright
SYNOPSIS
run-with-memusage binary arguments
DESCRIPTION
run-with-memusage is a helper script for the memusage wrapper library provided by glibc. Memusage collects statistics about application memory management during its runtime and reports them after the application exits. Please note that the application needs to exit normally or gathering of statistics fails; for example, applications terminated with various signals will not produce any statistics output.
The script runs given binary (with its arguments) under memusage using suitable options for the Maemo environment. For example maemo-launched applications are run with maemo-summoner.
Normally script uses just LD_PRELOAD to run the application under mallinfo, but that doesn't work with Scratchbox. Inside Scratchbox the script needs to temporarily modify /etc/ld.so.preload file instead when starting the application. For additional details about the environmental variables controlling the behavior of libmemusage, please see malloc/memusage.c in the glibc source tree.
EXAMPLES
There are a few ways to use this script:
o If the binary is using "maemo-launcher", this script can be linked to the binary name instead of the "maemo-invoker" and the script will automatically call "maemo-summoner" as needed.
o Call the binary directly with this script, e.g. like this:
DISPLAY=:1
run-standalone.sh run-with-memusage <binary> <arguments>
o Rename the original binary to <name>.real and put/link this script in place of the original binary.
FILES
/etc/ld.so.preload
SEE ALSO
maemo-summoner(1)
COPYRIGHT
Copyright (C) 2008 Nokia Corporation.
This is free software. You may redistribute copies of it under the terms of the GNU General Public License v2 included with the software. There is NO WARRANTY, to the extent permitted by law.
Improve this page