From 4bba678dce5bd3e8f20b9573d366ca7bdfd26daf Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 23 Feb 2019 12:12:34 -0500 Subject: [PATCH] Why do we use so much stack? #695 docs --- firmware/global.h | 8 ++++++-- firmware/util/efilib2.cpp | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/firmware/global.h b/firmware/global.h index 40774fae51..d69685f165 100644 --- a/firmware/global.h +++ b/firmware/global.h @@ -52,8 +52,12 @@ typedef unsigned int time_t; #define VALUE(x) VALUE_TO_STRING(x) #define VAR_NAME_VALUE(var) #var "=" VALUE(var) -// project-wide default thread stack size -// see also PORT_INT_REQUIRED_STACK +/** + * project-wide default thread stack size + * See also PORT_INT_REQUIRED_STACK + * See getRemainingStack() + * See getMaxUsedStack() + */ #define UTILITY_THREAD_STACK_SIZE 400 #define EFI_ERROR_CODE 0xffffffff diff --git a/firmware/util/efilib2.cpp b/firmware/util/efilib2.cpp index f5e258a077..ded927ce9c 100644 --- a/firmware/util/efilib2.cpp +++ b/firmware/util/efilib2.cpp @@ -40,6 +40,9 @@ efitime_t Overflow64Counter::update(uint32_t value) { } #endif +/** + * See also getRemainingStack() + */ int getMaxUsedStack(uint8_t *ptr, int size) { /** * maximum used stack size total stack buffer size minus position of first modified byte