xiaoxiang781216 commented on a change in pull request #1369: URL: https://github.com/apache/incubator-nuttx/pull/1369#discussion_r449886721
########## File path: arch/arm/src/arm/arm_initialstate.c ########## @@ -52,13 +52,7 @@ * Pre-processor Definitions ****************************************************************************/ -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ +#define IDLETHREAD_STACKMARGIN 128 Review comment: The call chain is fixed: __start(2)->nx_start(2)->up_initial_state(1)->up_use_stack(2)->arm_stack_color(3) The number of local variables declared by each function is marked in the parenthesis. The total number is 10(40 bytes) which is much less than 128 bytes. Yes, it isn't 100% safe in the theory, only assembler code like go_nx_start can give 100% guarantee. If you like go_nx_start approach, I can keep go_nx_start as before and let up_use_stack skip to colorize the idle thread stack. But, I don't have time to implement go_nx_start for each SoC. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org