TheThingsProducts / gateway

The Things Kickstarter Gateway
https://www.thethingsindustries.com/docs/gateways/models/thethingskickstartergateway
54 stars 20 forks source link

Fixed app stack size #40

Closed martinichka closed 6 years ago

martinichka commented 6 years ago

Print stack high water marks of sys, app, tcpip, lora tasks. Increased app stack from 4k to 8k.

KrishnaIyer commented 6 years ago

The MPLAB IDE shows that the Data Memory is 99% used. gtw-memory

This is clearly incorrectly shown.

What is the current resource utilization?

martinichka commented 6 years ago

This is clearly incorrectly shown.

This is correct. The heap and stacks (per tasks) are managed by FreeRTOS, which is a huge static array (250k). All mallocs and stacks are 'allocated' in the static array. The global libc heap is not used and the processor's stack is only used for the startup functions of FreeRTOS.

KrishnaIyer commented 6 years ago

Great. This clarifies my question. Merge is postponed until testing is completed.