Re:Show HN: A Fast, Malloc-Free C++14 Json Parser and Encoder
by rurban on Friday November 14, 2014 @01:16PM
(#8608569)
Sorry, didn't read the code yet. But malloc free means stack allocation, thus dangerous to stack attacks. Please clarify.
[ Parent
| on HN ]
Re:Show HN: A Fast, Malloc-Free C++14 Json Parser and Encoder
by BinaryIdiot on Friday November 14, 2014 @01:30PM
(#8608658)
I also haven't read the code yet but malloc free may simply mean the code doesn't call malloc but it can still allocate things on the heap using New.
Re:Show HN: A Fast, Malloc-Free C++14 Json Parser and Encoder
by k4st on Friday November 14, 2014 @01:34PM
(#8608689)
This program appears to use heap allocation, at least indirectly through its use of std::string.
On a more general note, libraries that perform zero dynamic allocation (and instead require the library user to pass in memory) can be very convenient for systems programming where portability is a concern. For example, I use Intel XED instruction encoder/decoder, which is a library that performs no dynamic memory allocation. This allows me to use it in user space and kernel space without hijacking the malloc symbol.