xiaoxiang781216 commented on pull request #4782:
URL: https://github.com/apache/incubator-nuttx/pull/4782#issuecomment-963799515


   > Is this a good idea? Allocating memory in an interrupt context can effect 
latency and add jitter.
   > This will actually make the `free` part succeed, 
   
   The intent of change is allowing 
https://github.com/apache/incubator-nuttx/pull/4759 can do the check even in 
the interrupt context. So, malloc/free shouldn't call from the interrupt 
context.
   
   > and we will be freeing memory if we successfully get the lock on the first 
try. `malloc` in the other hand only `DEBUGVERIFY` the check, when debug 
options are disabled we are then allocating memory and possibly without holding 
the lock?
   
   How about we add DEBUGASSERT in malloc/free to catch the wrong usage?
   


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