[lkml]   [2000]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Object Oriented Linux
    Khimenko Victor wrote:
    > Kernel does not have malloc and
    > friends so new/free can not be used (allocations in kernel should be used
    > ONLY when really necessary).

    typedef unsigned int size_t;

    extern "C" void *kmalloc(size_t size);

    inline void *operator new(size_t size)
    return kmalloc(size);

    char *foo(int n)
    return new char[n];

    g++ -c -O -fno-exceptions
    size t.o
    text data bss dec hex filename
    21 0 0 21 15 t.o

    This is a red herring. All of it.

    > Kernel lacks suppot for rtti and exceptions.

    See above.

    > "Linux is free software"

    Yup. And one principle of Free software is "don't tell other people
    what to do".

    I'm sorry, Victor but this one gets under my skin. If people want to
    write kernel code in C++ well good for them. All it requires of the
    kernel developers is to take the darn C++ keywords out of the headers.
    About an hour's work for someone who has a license for /bin/vi.

    This is an ideological language war masquerading as a technical and
    supportability issue.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:57    [W:0.021 / U:34.868 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site