News for hackers. Stuff that matters.
Re:Regression in Linux 4.14 – using bcache can destroy the f... by Taniwha on Tuesday November 21, 2017 @08:30PM (#15753439)
IMHO the big problem is new/delete, which C++ many programmers treat as close to 0-cost - in the kernel you have to worry about interrupts, SMP, real-time issues and priority inversions caused having your code hang in ISRs trying to alloc memory - all that nice STL code, string code, etc etc it's full of new/deletes, it can't live in the kernel

C programmers: you're not off the hook - malloc/free are just as bad, which is why the kernel has it's own context appropriate memory allocaters.

And of course don't forget that malloc/free (and I assume new/delete) are not safe to be used inside user space signal handlers

There are no comments on this comment yet.