Skip to main content
Knowledgebase
Home
Renesas Singapore - Knowledgebase

Why I am receiving error message: C3021 (F) memory overflow

Latst Updated:07/19/2017

Question:

Why am I receiving the error message below and how do I avoid it?
C3021 (F) memory overflow

Answer:

This error message is output when the PC you are using does not have enough available memory to be secured for compilation. You can consider the reason to be an increase in the amount of memory in use by the OS or insufficient optimization. However, the upper limit on the memory capacity that the SHC compiler can use as an application is 2Gbytes.

You may be able to avoid this in any of the following ways.

  1. Not outputting information for debugging. Do not specify the –debug option.
  2. Exempting all external variables from being targets of optimization. Specify the -global_volatile=1 option.
    You may be able to reduce the load which is generated by analyzing the optimization.
  3. Dividing up the scope of optimization. Do not specify –noscope.
    Specifying –noscope may lead to large functions not being divided up in compilation so that they use large amounts of memory.
  4. Divide up the file or function for which this error occurs.
Suitable Products
C/C++ Compiler Package for SuperH Family