Announcement

Collapse
No announcement yet.

Available RAM at runtime?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • EMHmark7
    replied
    May goal was just to know how much RAM available.

    "giving some bytes for "cash-flow" ", I mean declaring an array less large than the declared available heap,
    so we can continue running the program, and ask again,

    because, I do not know if the available RAM is just in one chunk or can be in several ones. The question is how much we can estimate available RAM.
    Or if the OS always defragment RAM.

    My program is about 14,231 bytes out of 14,400. (for stuff difficult to externalize in a function)
    So, a sensitive knowledge, Thanks,

    Marc

    Leave a comment:


  • ESPsupport
    replied
    Generally it manages chunks well, unless your program 'obviously' tries to fragment the heap. I have in the past tried allocating 32k, 16k.... 2, 1 byte chunks decreasing the size when the allocations fail to determine total free, but never found any useful purpose for doing it other than testing functionality of the heap.

    Leave a comment:


  • EMHmark7
    replied
    Ok, at least it gives an optimistic safe value. But I suppose it means, there may be other smaller available chunks. what about them (I mean with a simple function call)?.

    A more heavy duty method could be a loop declaring a local array with mem-Heap() size, giving some bytes for "cash-flow" and then do it again with another mem_Heap() chunk and output values on monitoring terminal and sum up them.

    Thanks,
    Marc
    Last edited by EMHmark7; 5th June 2014, 10:29 PM.

    Leave a comment:


  • ESPsupport
    replied
    mem_Heap() gives you that

    Leave a comment:


  • EMHmark7
    started a topic Available RAM at runtime?

    Available RAM at runtime?

    Hi, on uLCD-43PT (Picaso) I do not see a function returning how much RAM is available (at runtime). Is there a way to know?

    I am loading several functions so for that I can know. But it also helps me to know how many items (with text strings) the user can add in a picklist.

    Thanks,
    Marc
Working...
X