LWN.net Logo

Why all the runtime allocations? (off-topic)

Why all the runtime allocations? (off-topic)

Posted Apr 9, 2009 4:17 UTC (Thu) by pr1268 (subscriber, #24648)
In reply to: Async I/O by bojan
Parent article: Linux Storage and Filesystem workshop, day 1

This is going way off-topic, but why all the runtime allocations in your sample program? Malloc(3), calloc(3), and free(3) are horribly expensive, relatively speaking. Automatic/static storage for those structs and that char buffer would be substantially faster.


(Log in to post comments)

Why all the runtime allocations? (off-topic)

Posted Apr 9, 2009 6:14 UTC (Thu) by bojan (subscriber, #14302) [Link]

Just being lazy to call memset(), I guess...

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds