Originally posted by ultimA
View Post
Object-oriented design patterns in the kernel, part 1 - https://lwn.net/Articles/444910/
Originally posted by ultimA
View Post
And the Linux kernel supports kernel module and anything used in the API must be stable and the compiler cannot just remove a field from it.
Thus, in practice, this devirtualization might not work that well.
When you opt-in to use abstract class or virtual method in C++, you must consider its cost and cannot expect it to be zero-cost without some analysis on its specific use cases.
Comment