error: out of memory in function <name of function>

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • conics
    New Member
    • Feb 2008
    • 30

    error: out of memory in function <name of function>

    what can i do when on compiling a "C" program i have arrive at the error of

    out of memory in function <name of function>

    thanks in advance..

    conics
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Your function is either extremely big or your compiler simply needs more memory to do its job. If it's the first: don't show us the function but break it down to several smaller functions.

    kind regards,

    Jos

    Comment

    • conics
      New Member
      • Feb 2008
      • 30

      #3
      Originally posted by JosAH
      Your function is either extremely big or your compiler simply needs more memory to do its job. If it's the first: don't show us the function but break it down to several smaller functions.

      kind regards,

      Jos
      i see.. thank you very much..

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        My experience of such things is that it is the optimiser not the compiler that needs lots of memory (particularly for large functions).

        This means in a pinch (and if performance is not an issue) you can switch off the optimiser (may be just for the problem file) and the code will then compile where you were running out of memory.

        Comment

        • conics
          New Member
          • Feb 2008
          • 30

          #5
          thanks, already solved it. changed the memory to "large"

          Comment

          Working...