You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uVisor: Standardize available legacy heap and stack
With the RTOS, the STACK_SIZE specified here is unrelated to the stack
size available for the main thread (that runs pre_main). Save memory by
reducing the stack size to a more reasonable amount.
On uVisor, HEAP_SIZE is both a minimum available and maximum available
heap size. The heap can't grow beyond the end of the heap into the
neighboring stack. On all uVisor-supported platforms, guarantee at least
0x6000 bytes of heap space. This increases the portability of uVisor
applications as the memory available for legacy heap allocations is
guaranteed. This helps to avoid out of memory errors on platforms that
were previously guaranteeing less memory.
Copy file name to clipboardExpand all lines: targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/device/TOOLCHAIN_GCC_ARM/MK64FN1M0xxx12.ld
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -53,9 +53,15 @@ ENTRY(Reset_Handler)
53
53
54
54
__ram_vector_table__ = 1;
55
55
56
-
/* Heap 1/4 of ram and stack 1/8 */
57
-
__stack_size__ = 0x8000;
58
-
__heap_size__ = 0x10000;
56
+
/* With the RTOS in use, this does not affect the main stack size. The size of
57
+
* the stack where main runs is determined via the RTOS. */
58
+
__stack_size__ = 0x400;
59
+
60
+
/* This is the guaranteed minimum available heap size for an application. When
61
+
* uVisor is enabled, this is also the maximum available heap size. The
62
+
* HEAP_SIZE value is set by uVisor porters to balance the size of the legacy
63
+
* heap and the page heap in uVisor applications. */
0 commit comments