anchao commented on code in PR #11351:
URL: https://github.com/apache/nuttx/pull/11351#discussion_r1423605797


##########
mm/mempool/mempool.c:
##########
@@ -46,43 +46,56 @@
  * Private Functions
  ****************************************************************************/
 
-static inline FAR sq_entry_t *mempool_remove_queue(FAR sq_queue_t *queue)
+static inline FAR dq_entry_t *
+mempool_remove_queue(FAR struct mempool_s *pool, FAR dq_queue_t *queue)
 {
-  if (!sq_empty(queue))
-    {
-      FAR sq_entry_t *entry = queue->head;
+  FAR dq_entry_t *ret = queue->tail;

Review Comment:
   I think alloc the buffer from the tail of the queue will cause more cache 
miss. If this PR just to facilitate KASAN detection, it is better to add 
condition check if KASAN is enabled.



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