DragonFly BSD
DragonFly kernel List (threaded) for 2006-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

malloc/free/realloc will be renamed in the kernel

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 4 Sep 2006 11:28:12 -0700 (PDT)

    I've cleaned up most of the conflicts that would otherwise prevent
    kernel code from being linked against libc.  There are only a few
    remaining and really only one that entails a great deal of work...
    that being the kernel's malloc(), realloc(), and free() procedures.

    These procedures have very different arguments in the kernel then in
    userland, and they are called from about 800 files.

    After careful consideration I have decided to physically rename the
    kernel procedures rather then use #define tricks.   I have decided
    on the following translations:

    malloc -> kmalloc
    free -> kfree
    realloc -> krealloc

    Due to the number of files effected I am going to create shims so both
    names can be used during the transition period, which will allow me to
    piecemeal commit the actual work.  Once the work is done the original
    names will be removed.  I will write a program to run through the
    source code and make most of the changes automatically.  A few syntax
    glitches may occur during this process so bear with me!

    I will gone Wed-Fri so this work may extend into the coming weekend.

					Matthew Dillon 

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]