Author Topic: OUR_HEAP_SIZE increments  (Read 3455 times)

Offline alager

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
OUR_HEAP_SIZE increments
« on: July 12, 2010, 10:00:07 PM »

My project has run to the limits of the chip I'm using, and I ran out of stack space.  After a lot of squeezing here and there, I changed the OUR_HEAP_SIZE define.
Code: [Select]
Code: [Select]

I don't know enough about the memory structure to know if this is an issue or not.  Things seem to be working for now.
HEAP   Free 0x0194 from 0x5600
STACK   Unused 0x00d7
Prior to the heap change, I had no stack left. 

What are your thoughts on changing from 1024 to 512? 

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3188
    • View Profile
    • uTasker
Re: OUR_HEAP_SIZE increments
« Reply #1 on: July 13, 2010, 02:23:22 AM »
Hi Aaron

You are certainly quite close to the RAM limits (from the results you have 404 free bytes on heap which may be able to be given for stack use).

(43 * 512) is the same as (21.5 * 1024). The * 1024 is used so that the first figure represents kBytes - also (21.423 * 1024), etc.  would be OK if you prefer to think in kBytes. The value is first calculated by the compiler as a float value and then rounded to nearest integer.