Messages in this thread | | | Subject | Re: linux headers and C++ | Date | Tue, 6 Jul 1999 22:53:04 +0100 (BST) | From | Alan Cox <> |
| |
> new should throw bad_alloc if it fails to allocate memory. If you catch > and rethrow exceptions properly you can do all the standard releasing of
That needs exceptions. You will have a fairly bad time trying to handle C++ exceptions in the Linux kernel (apart from the giant table size g++ outputs you have to deal with interrupts, re-entrant exception handling and the like - and of course you have to handle running out of memory in the exception handler (yes this last one is foul in C too))
> The primary reason I can see to keep C++ out of the kernel is that the user > base doesn't seem to be large enough to get over the initial barrier of > making it work and supporting it yet. If it were, the necessary patches > would already be in doubters hands and none of us would be wasting > bandwidth on the subject.
Writing mainstream kernel code in C++ would IMHO be crazy. Allowing people to write C++ modules seems to be quite reasonable.
Alan
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |