4 ms·
nkurz is right about the intention of the title, but if TLSF is only intended for real-time systems, then why does it claim that it is general-purpose, and not
by haberman 18y ago
nkurz is right about the intention of the title, but if TLSF is only intended for real-time systems, then why does it claim that it is general-purpose, and not include any caveats of the sort you do? Like all memory allocators I've encountered, none of them say "if you're doing X, you're probably better off using a different allocator." The closest it comes to a caveat is:
> Although TLSF works rather well in many scenarios, it stands out in applications with hard/soft real-time application which uses explicit memory allocation with high flexibility requirements due to a high variability of the data size or adaptability to new situations.
Or paraphrased: "TLSF is great, but is especially great when..."
- scott_s 18y agoIt was designed for real time systems, and evaluated in the context of real time systems. (Check out the academic papers.) "General purpose" just means it implements the malloc/free interface, and can be used in place of the standard on your system. In the case that most people care about, I think something like TCMalloc (http://goog-perftools.sourceforge.net/doc/tcmalloc.html http://goog-perftools.sourceforge.net/doc/tcmalloc.html) is more appropriate.