You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/07/26 22:17:01 UTC
[GitHub] [trafficserver] SolidWallOfCode commented on pull request #8069: Add an option to avoid heap allocation in TSMimeHdrField* APIs
SolidWallOfCode commented on pull request #8069:
URL: https://github.com/apache/trafficserver/pull/8069#issuecomment-887064811
As noted on the other PR, I would prefer an approach that returns the struct rather than taking a pointer. There's no state in the struct so clean up is unncessary. A full struct would only be 16-24 bytes which is not excessive for a return. In fact, looking at the generated code, the compiler allocates the return struct on the stack and passes a pointer to it to the function, making that just as efficient (if not more so) than explicitly passing the pointer.
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org