Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Or a call to strlen() which makes your 120 cycles of latency start to look good ...

Edit to add: I've used both malloc()/free() and a custom memory allocation API that required the size to be passed in. I found the second API to be much more of a pain to use over the long term. Besides, it wastes memory because the memory API will have to track the size anyway to detect misuse of the API (or else blindly trust that the right size is passed in and hilarity ensues when it's not ...).



Well you could use free() whenever it's practical and free_sz () when you can get the performance.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: