xiaoxiang781216 commented on a change in pull request #1369: URL: https://github.com/apache/incubator-nuttx/pull/1369#discussion_r487147789
########## 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: > > ping again, @davids5 this patch is pending for more than two months, could you answer my question a little bit timely? > > What I suggested will work, you understanding it may not. This will safely get the the margin. Why don't you try it, Yes, I want to try, but it can't work and I have give my answer two months ago, but you ignore it silently. So I have copy my response here again, please you give me your comment one by one, so I can try with your new propose: 1.Many arch don't have xxx_stack_color, but call memset directly, then we have to add some margin again for memset. Here is an example: ``` #ifdef CONFIG_STACK_COLORATION if (tcb->pid == 0) { /* The whole idle thread stack can't be colored here * because the code is running on the idle thead now. */ memset(tcb->stack_alloc_ptr, 0xaa, stack_size - STACK_MARGIN_IDLE); } else { memset(tcb->stack_alloc_ptr, 0xaa, stack_size); } #endif ``` Pleaase tell me how can I measure memset stack consumption with your method? Do you want me to add the marker into memset? 2.The code isn't portable at least in the theory, because the compiler permit to move "register real vars...;" out of the marker. Actually before I made the change in this way, I have consider your propose carefully and give up finally due the reason I mention previous. ---------------------------------------------------------------- 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