Why is kfree_s useful?

Nat Lanza (magus@cs.cmu.edu)
21 Apr 1999 14:36:46 -0400


As the subject says, why is kfree_s useful in its current state? Sure,
it's nice to have protection against trying to free the wrong memory,
but is quietly not freeing memory really the best way to do this?

It seems to me that if code has the sort of bugs that kfree_s is
supposed to protect against, a slow core leak due to kfree_s quietly
not freeing memory isn't really that much better than crashing
immediately. At least in the second case you see where things went
wrong. Wouldn't a a "hey idiot, you tried to free memory with a bad
size" sort of warning be best?

--nat

-- 
nat lanza --------------------- research programmer, parallel data lab, cmu scs
magus@cs.cmu.edu -------------------------------- http://www.cs.cmu.edu/~magus/
there are no whole truths; all truths are half-truths -- alfred north whitehead

- 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/