lkml.org 
[lkml]   [2000]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.321 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site