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


   > > 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 #4759 can do the check even in 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?
   
   Why not make the  mm/mm_heap/mm_sem.c change dependent on CONFIG_DEBUG_MM?
   
   Effectively the code is left as is when CONFIG_DEBUG_MM is not defined and 
as in this PR when it is defined?


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