[lkml]   [2008]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Why is the kfree() argument const?
    On Jan 18, 2008 6:02 AM, David Schwartz <> wrote:
    > However, *destroying* an object is not a metadata operation -- it destroys
    > the data as well. This is kind of a philosophical point, but an object does
    > not have a "does this object exist" piece of metadata. If an object does not
    > exist, it has no data. So destroying an object destroys the data and is thus
    > a write/modification operation on the data.

    In C++ you can delete a const pointer. Now I know kernel hackers
    aren't especially impressed with C++ but maybe someone could look up
    the rationale for that design decision (I couldn't find it). It might
    shed some light on this discussion.


     \ /
      Last update: 2008-01-18 19:09    [W:0.019 / U:6.368 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site