Gary-Hobson commented on PR #14348:
URL: https://github.com/apache/nuttx/pull/14348#issuecomment-2415669014

   Sorry, my commit message may not be clear enough.
   
   > > The malloc() function allocates size bytes and returns a pointer to the 
allocated memory. The memory is not initialized. If size is 0, then malloc() 
returns a unique pointer value that can later be successfully passed to free().
   > 
   > do you mean to require host malloc to follow the specific behavior? why?
   
   I want to align the behavior of sim_heap(Customized heap manager) and 
mm_heap(Default heap manager).
   
   The default heap management in nuttx returns a valid memory address when 
malloc(0), In sim_heap, malloc(0) returns NULL.
   This PR makes malloc(0) in sim_heap return a valid pointer
   
   > 
   > > (See "Nonportable behavior" for portability issues.)
   > 
   > what exactly are you referring to here?
   This part is an excerpt from the man manual,It might be missing some 
context, I've updated the commit message
   


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

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to