Home
Support

Knowledge Base

BSPs and drivers
Community resources
Product documentation
Questions?
Contact us

logging memory footprint
 
________________________________________________________________________

Applicable Environment
________________________________________________________________________
  • Topic: Logging memory footprint
  • SDP: 6.5.0
  • Target: Any supported target
________________________________________________________________________

Recommendation
________________________________________________________________________

At one point in the common project there is the demand to keep the hardware setup as small as possible. Even with the current prices for memory installing 64 instead of 256MB of RAM can have a significant impact on the revenue. Yet there is a problem to find out what the maximum memory demand for the running device will be.

This could be evaluated by using the memory analysis view in the IDE but at the price if having to run qconn on the target and watch the IDE most of the time. Using pidin mem will give an overview as well, yet the output is pretty cryptic and hard to digest. So what is needed is a small utility with low impact on the system which nonetheless keeps an overview of the memory level.

The memlogdev does just that. After starting it detaches from the calling process and checks the available memory on a regular base, keeping high and low water marks. These values can be read from the resource manager handle. The interval can be set on the command line, default is to check every 1000ms. The original customer reported that they could not notice a performance cave in while using 10ms.

Usage: memlog <-d delay in ms>
Default is to wait 1000ms

# cat /dev/memlog
12.23M / 123.43M

Meaning that while the logger was running the lowest amount of memory in use was 12.23M and the highest amount 123.43M. This means the system should safely run with 128MB of memory installed.

________________________________________________________________________
NOTE: This entry has been validated against the SDP version listed above. Use caution when considering this advice for any other SDP version. For supported releases, please reach out to QNX Technical Support if you have any questions/concerns.
________________________________________________________________________


Related Attachments
 Attachment Name Size Last Modified
 memlog.c 10KB 11/3/2009 9:16 AM





Please contact us with your questions or concerns.