[ 
https://issues.apache.org/jira/browse/DISPATCH-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16865856#comment-16865856
 ] 

Chuck Rolke commented on DISPATCH-1371:
---------------------------------------

When trying to figure out a use-after-free bug it is harder when the most 
recently used object is put back in service immediately this way. If this 
change is known to be a faster way to go overall then I won't object to it.

With the DEQ of objects doesn't adding an object to end of a queue also change 
the pointer at the head of the queue? If so then maybe there is not that much 
cache advantage to adding or removing from the tail instead of the head.

 

> qd_alloc can reuse instances in LIFO order
> ------------------------------------------
>
>                 Key: DISPATCH-1371
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1371
>             Project: Qpid Dispatch
>          Issue Type: Improvement
>    Affects Versions: 1.8.0
>            Reporter: Francesco Nigro
>            Priority: Minor
>
> qd_dealloc is inserting instances on the tail of the thread local free_list 
> while qd_alloc is reading from the head, always causing cache misses unless 
> free_list size is 1.
> qd_alloc could instead reuse the last inserted instance ie the tail, using 
> free_list as a stack (with LIFO accesses).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to