HPlogo HP C/HP-UX Programmer's Guide: HP 9000 Computers > Chapter 4 Optimizing HP C Programs

Limiting the Size of Optimized Code

» 

Technical documentation

Complete book in PDF

 » Table of Contents

You can disable optimizations that expand code size at the second, third, and fourth optimization levels by using the +Osize option, as follows:

cc
+O2 +Osize sourcefile.c

or:

cc
+O3 +Osize sourcefile.c

or:

cc
+O4 +Osize sourcefile.c

Most optimizations improve execution speed and decrease executable code size. A few optimizations significantly increase code size to gain execution speed. The +Osize option disables these code-expanding optimizations.

Use this option if you have limited main memory, swap space, or disk space.

© Hewlett-Packard Development Company, L.P.