Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Reducing the memory size of a PhAB application
Ref. No. QNX.000009462
Category(ies) Development
Issue We would like to reduce the size of our Photon  applications built with PhAB. We have used the option "-Osax" and non-debug shared lib to make the applications smaller.

Which is the best way to use the least amount of memory?
Solution In addition to the above link with Aplib instead of Aplib_s. 

Another thing worth looking into is images.  If there are copies of the same image in multiple widgets, putting the image in a widget database may reduce both the size of the executable and the amount of RAM it needs at runtime (at the cost of some extra code).  It might also make sense to put the image in a separate GIF or JPEG file and load it via PxLoadImage().  But since this requires PxLoadImage() to be linked into the app, it only makes sense if the image is big and compresses well, or if the app is using PxLoadImage() anyway.