davids5 commented on pull request #3517:
URL: https://github.com/apache/incubator-nuttx/pull/3517#issuecomment-817829909


   > > > @davids5 the comment is added.
   > > 
   > > 
   > > @xiaoxiang781216 Thank you!
   > > This is still un clear to me. What is the frame in this context?
   > > Can you add a ASCII diagram that show the points that the pointers 
represent now.
   > 
   > @davids5 here is the diagram:
   > 
https://github.com/apache/incubator-nuttx/pull/3517/files#diff-b60d398c141520d01499c0154109c89556dc639d5895018f328455f443c229a6R314-R330
   
   Thanks!
   
    This helps to have the conversation
   
   I'm I correct in assuming this is in lowest address first?
   ```
    *   Here is the diagram after some allocation:
    *
    *                   +-------------+ <-stack_alloc_ptr (lowest)
    *                   |  TLS Data   |
    *                   +-------------+
    *                   |  Arguments  |
    *   adj_stack_ptr-> +-------------+\
    *                   |  Available  | +
    *                   |    Stack    | |
    *                |  |             | |
    *                |  |             | |
    *                v  |             | +->adj_stack_size
    *                   |             | |
    *                   |             | |
    *                   +-------------+ |
    *                   |Thread Data* | +
    *                   +-------------+/
   ```
   
   "adj_stack_ptr: Adjusted initial stack pointer after the frame has been 
removed from the stack" 
   
   How can this be the adjusted initial stack pointer? It is at the base of the 
stack.
   
   The inital stack pointer is the what is used to align and set the SP - it is 
the TOP of the stack.
   
   So what is confusing is "Adjusted initial stack pointer after the frame has  
been removed from the stack allocation."
   
   adj_stack_ptr `Adjusted stack base pointer after the TLS Data and Arguments 
has been removed from the stack allocation.`
   


-- 
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


Reply via email to