Reducing Program Image Size by Extracting Frozen Code and Data

Constraints on the memory size of embedded systems require reducing the image size of executing programs. Common techniques include code compression and reduced instruction sets. We propose a novel technique that eliminates large portions of the executable image without compromising execution time (due to decompression) or code generation (due to reduced instruction sets). Frozen code and data portions are identified using profiling techniques and removed from the loadable image. They are replaced with interrupts that load them in the unlikely case that they are accessed. The executable is sustained in a runnable mode.

Analysis of the frozen portions reveals that most are error and uncommon input handlers. Only a minority of the code (less that 1%) which was identified as frozen during a training run, is also accessed with production datasets.

Applying this technique results in a maximal code reduction of 90% (average 62%) in the image size of the SPECINT CPU 2000 benchmarks and 40% (average 20%) in the data image size. For the SPECFP CPU 2000 maximial code reduction reached up to 90% reduction (average 80%) and static data reductuion reached up to 90% (average 50%).

By: Daniel Citron, Gadi Haber, Roy Levin

Published in: H-0224 in 2004


This Research Report is available. This report has been submitted for publication outside of IBM and will probably be copyrighted if accepted for publication. It has been issued as a Research Report for early dissemination of its contents. In view of the transfer of copyright to the outside publisher, its distribution outside of IBM prior to publication should be limited to peer communications and specific requests. After outside publication, requests should be filled only by reprints or legally obtained copies of the article (e.g., payment of royalties). I have read and understand this notice and am a member of the scientific community outside or inside of IBM seeking a single copy only.


Questions about this service can be mailed to .