3 ms·
man 3 free
by edsiper2 12y ago
man 3 free
- tokenrove 12y agoA typical implementation of free(3) does not give real-time guarantees; whether you use GC or not, you need to know things about your allocator to have any kind of latency guarantees. I get a little disturbed when people treat malloc() and free() as if they were constant-time operations.
- nraynaud 12y agomore exactly malloc and free typically gives you shitty time guarantee. The usual thing people do in real time is bailing out of any dynamic allocation, they know malloc is not good, they are afraid or don't want to deal with real time GC, and/or they know that if they do all the allocation first, they have a grasp on the worst case of their loop (I think the real answer is that it's a tradition).
- tkellogg 12y agoReminder: There are real-time allocators available, they just tend to not be used because the average case is worse. * http://repository-of-projects.googlecode.com/svn/trunk/document/c_c++/memory/TLSF/Two-Level%20Segregated%20Fit.pdf http://repository-of-projects.googlecode.com/svn/trunk/docum... * http://www.ijera.com/papers/Vol2_issue3/GR2311511156.pdf http://www.ijera.com/papers/Vol2_issue3/GR2311511156.pdf