News for hackers. Stuff that matters.
Re:Comparing C and C++ usage and performance with a real wor... by blub on Sunday September 03, 2017 @12:47PM (#15162429)
Never freeing is sloppy, it means resource handling was likely not thought through. I would be concerned about non-memory resource handling in particular.

If one must use this "trick", it's better to think things through, add the appropriate release calls and then somehow replace the release function with a no-op.

Anyway, you're welcome to take a C++ project and translate it to a fast C project with fewer dependencies and lower memory consumption. Then we can discuss facts instead of your personal opinions.

Re:Comparing C and C++ usage and performance with a real wor... by TickleSteve on Sunday September 03, 2017 @01:39PM (#15162701)
Never freeing is common practice in embedded systems where you should be pre-allocating all data (after worst-case analysis). This removes any possibility of fragmentation issues, etc. Many coding standards forbid dynamic allocation for embedded & real-time systems also for safety & reliability reasons.

It is not unusual to have allocate-only heaps for exactly these reasons.

Re:Comparing C and C++ usage and performance with a real wor... by blub on Sunday September 03, 2017 @02:53PM (#15163126)
I agree, but the C idiom is to just not call free, without pre-allocating anything. It's an optimisation to avoid waiting for the resources to be released, with the idea that they will be anyway when the process is killed.