A typical performance issue is calling malloc/free all the time, it can be avoided but there are no standard ways.
I hope some great features of C++ get some day backported to C. But don't bet money on that :(
A typical performance issue is calling malloc/free all the time, it can be avoided but there are no standard ways.
I hope some great features of C++ get some day backported to C. But don't bet money on that :(
C has evolved over time, but it has not left its niche: a systems programming language which is a thin abstraction of hardware. If you want a higher abstraction of the hardware, then C is not your best choice.
It's a blind pig with fifteen legs, trying to put on its own lipstick while riding a unicycle.
Well done.
edit: Ignore this post. I misread. I'm an idiot. Sorry about that
C++ template libraries are cleaner, easier to improve and adapt, and often faster than the C counterparts (when there are counterparts!) A good example was how OpenMP was added to the basic types in the STL (on GNU/gcc/libc++) by a quite small group of people last year.
Another example are the regular expression libraries.
I'm not an Stroustroup/C++ apologist but this language is the absolute best in several traits. I like to code in Python the most but C and C++ are still fun and make sense in their own way. I hate languages that make programming hard just because they follow an overcomplicated paradigm and don't give you anything useful back from that (like Java, IMNSHO.) In particular all languages with multi-million dollar advertisement campaign just piss me off (the language, not the tools.)
I tend to see all major projects end up doing things their way: OpenSSL, Apache HTTPd, GCC, Linux, BSD, for example.
Hoard is also suitable for use in real applications: http://www.hoard.org/
Then there's my work, which is frankly not suitable for using in a real application since it's tested as heavily as the other two I mentioned: http://people.cs.vt.edu/~scschnei/streamflow/
But my original point was there is no stantard way. It should be part of CXX, libc, or POSIX, IMHO. C is just too atomized.
Also, I can't edit my post, but that should say "it's not tested as heavily."
[yeah, I guessed you meant that from the sentence structure]
In particular, at startup TCMalloc allocates approximately 6 MB of memory.