Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
I am currently working on a project which is currently running four tasks with the following memory occupancy of 100 KB / 256 KB. And on top of that I am implementing another task to run a HTTP server and I have followed the TI-RTOS HTTP server example from the following link to run a HTTP server in TM4C1294NCPDT.
http://processors.wiki.ti.com/index.php/TI-RTOS_HTTP_Example
I have made modifications to the example code using getTime.cgi to implement a server to cater 20-25 CGI functionalities and on using the server the heap memory is getting filled and throwing the following memory error.
ti.sysbios.heaps.HeapMem: line 361: out of memory: handle=0x2001964c, size=2048
This occurs on using the server continuously with one/many CGI functionality continuously or refreshing the page multiple times.
The heap memory was initially set at
BIOS.heapSize = 0x8000 (32 KB)
On increasing the heap size it prolonged the duration of crash to occur for some clicks/refresh. Currently the heap memory size is set at the following value
BIOS.heapSize = 0x1F000 (124 KB)
1. Why does the heap memory issue occur? What are the ways to avoid it?
2. What is the limit on the number of CGI functionalities we can add with the available 256 KB of RAM?
3. Is it appropriate to increase BIOS.heapSize? If so, the What is the maximum value we can set for BIOS.heapSize?
Please do ask if any required information is missed or any additional information is required. Thanks in advance.