The Horror in the Standard Library
zerotier.com
The Horror in the Standard Library
1–10 of 222 posts
Re: The Horror in the Standard Library
#2Re: The Horror in the Standard Library
#3Did you report the issue upstream with a patch? The solution to "the standard library is broken" is to fix the standard library, no? It's all free software after all.
And then you realize that it is.
Re: The Horror in the Standard Library
#4Did you report the issue upstream with a patch? The solution to "the standard library is broken" is to fix the standard library, no? It's all free software after all.
It seems like the libstdc++ maintainers are aware of the issue at least, so that's a start. It'd be nice if some of the mentioned discussions/complaints were linked, though, so we could see what has already been said/done.
Re: The Horror in the Standard Library
#5GLIBCPP_FORCE_NEW was the solution for the near term and since I was deploying on Solaris boxes I eventually switched to the Sun Forte C++ compiler.
It really bugs me that this problem still exists. :-/
Re: The Horror in the Standard Library
#6It's not exactly roses in C++ either of course. You can do better than the standard library facilities. Andrei Alexandrescu gave a great, entertaining, and technically elegant talk on memory allocation in C and C++ at Cppcon 2015 that is well worth watching
Re: The Horror in the Standard Library
#7Actually it is C's malloc and free that is "broken". malloc() takes a size parameter, but free() doesn't. This imbalance means it can never be maximally efficient. Whatever GNU stdlibc++ is doing is probably, on balance, a net win for most programs. It's not exactly roses in C++ either of course. You can do better than the standard library facilities. Andrei Alexandrescu gave a great, entertaining, and technically el…
Re: The Horror in the Standard Library
#8Re: The Horror in the Standard Library
#9Re: The Horror in the Standard Library
#10Maybe it'll get fixed now that a post saying "libc++ is broken" got hackernewsed