[lkml]   [2000]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: freeing a static after one use only?
    "A month of sundays ago Mike Galbraith wrote:"
    > Strike Two:
    > Package data in a seperate module.. load/use/eject?

    As near as I can tell, the problems I was having with this idea seem to
    be related to what gcc does when faced with

    static Foo foo;
    Foo bar[] = { .. masses of constants .. }
    foo = bar;

    as opposed to

    static Foo foo[] = { .. masses of constants .. }

    The latter is written correctly from the second module. The first form
    apparently tries to make itself automatic (best guess, despite the
    owww! in the consequences). Sprinkling the word "const" around didn't

    It certainly caused weird limited, nonfatal effects. Namely localised
    corruption on the array when reading back from it after having written
    to a different, kmalloc'ed area. It looks like the array got overwritten
    with addresses and data, which makes me think it got used as stack.
    Addresses in the range 0xC010.... were common.

    The problem is currently "solved".


    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:56    [W:0.032 / U:14.924 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site