Messages in this thread | | | Date | Fri, 14 Jul 2000 11:48:32 +0200 | From | Pavel Machek <> | Subject | Re: Object Oriented Linux |
| |
Hi!
> > inline void *operator new(size_t size) > > { > > return kmalloc(size); > > } > > Yes? Care to compile that? FYI, kmalloc() has _two_ arguments. And no, I'm > not being pedantic - choice of the second argument matters. Big way. C++ > has a notion of "allocation", but kernel has not. What it has is "atomic > allocation", "dma-suitable allocation", etc. Choosing the right one is > _not_ a task for compiler - it's AI-complete. Always forcing atomic is not > an option, BTW - performance hit will be too serious.
I already see this ugglyness:
n_tty.c: get_zeroed_page(in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
so C++ would not make it much worse.
Pavel
-- I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care." Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org
- 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/
| |