This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

heap size and stack size configuration

Hi,

I am new with CCS and ti ARM's and I am working with them about two month. my questions are about heap and stack size.

1. what is exactly heap size and stack size?

2. what is the maximum length of them?

3. how we can determine how much size is require?

4.Is there any way that CCS determine how much stack size and heap size require and change it automatically?

now in all of my codes heap size is zero but when I have unknown error I try increase stack size.

any help would be greatly appreciated,

Siyavash.

  • Hello Siyavash

    Since the question in general does not have anything specific to do with TM4C, the following link will be useful in understanding stack and heap.

    stackoverflow.com/.../what-and-where-are-the-stack-and-heap

    Regards
    Amit
  • Siyavash Asadi said:
    1. what is exactly heap size and stack size?

    Have you seen the Wiki page Stack and Heap size requirements, which has some notes from a CCS point of view?

    Siyavash Asadi said:
    3. how we can determine how much size is require?

    There is call_graph tool which can determine the stack size required, see the link in the above mentioned Wiki page.

    Siyavash Asadi said:
    4.Is there any way that CCS determine how much stack size and heap size require and change it automatically?

    Unfortunately, there is no automatic method in CCS.

    Siyavash Asadi said:
    now in all of my codes heap size is zero but when I have unknown error I try increase stack size.

    A heap size of zero means all dynamic memory allocations will fail. That is only a problem if your code uses dynamic memory allocation, or calls run-time library functions which use dynamic memory allocation such as printf.

    When you increase stack size do you mean the program fails to run for an unknown reason, or does the linker report an error about insufficient memory?