lkml.org 
[lkml]   [2005]   [Mar]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 29 Mar 2005 09:06:51 +0200 (MEST)
FromJan Engelhardt <>
SubjectRe: [PATCH] no need to check for NULL before calling kfree() -fs/ext2/
>> I see kfree used in several hot paths.  Check out
>> this /proc/latency_trace excerpt:
>
>Yes, but is the pointer being free'd NULL most of the time?

"[...]In general, you should prefer to use actual profile feedback for this 
(`-fprofile-arcs'), as programmers are NOTORIOUSLY BAD AT PREDICTING how 
their programs actually perform." --gcc info pages.

>The optimization does not help if you are releasing actual memory.

It does not turn the real case (releasing memory) worse, but just improves the 
unreal case (releasing NULL).



Jan Engelhardt
-- 
No TOFU for me, please.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:31    [W:0.358 / U:1.420 seconds]
©2003-2008 Jasper Spaans