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.