|
|
|
|
|
by blt
3947 days ago
|
|
The risk is that you'll screw up and write a buggy allocator with a security hole. Yes, if your program just needs to allocate lots of memory, do some computations, then exit, this approach works. But the programs where security is most critical do not usually follow that pattern. |
|
Look, I'm totally willing to accept that there might be flaws with this approach, but with the exception of adrusi, no one's objections have been all that reasonable. If there are legitimate objections (not just handwavy, oh, you'll probably implement the allocator wrong) I'd love to hear them. I use this pattern in my own code and I'll stop if there are legitimate flaws.
Also, Akamai released a patch for the OpenSSL allocator bug mentioned earlier. Guess what the patch used: mmaped regions.[2]
[1]: http://www.gnu.org/software/libc/manual/html_node/Obstacks.h...
[2]: http://thread.gmane.org/gmane.comp.encryption.openssl.user/5...