ecolbus@voila.fr wrote:It should be only cosmetic thing (and few warnings in some not yet identified cases). I doesn't follow it. Anyway C has the "as-if" rule, which it mean: the compiler could optimize as far the result doesn't change (time are not issues, and result could change if a valid compiler could give the same results). So a very smart compiler (which should compile all units at the same time) could do good things without need of explicit register, static (with some exceptions), const, volatile (if it very smart it know about system, signals, and it can set "volatile" on need), restrict, ... IIRC kmalloc(0) return an alias (but not so relevant in this discussion). Hmm. C is used not to do much optimization. One thing to remember is that function could have a lot of side effects, so compiler will/should never optimize in your way (but if compiler know exactly how kfree work internally). C "const" is a lot weaker to C++ "const". BTW, I doesn't like const in kfree, but I was talking about weak "const" in C. for sure! But C is anal in: "users know better than compiler on what they want to do", so compiler cannot do big optimizations C, without breaking C rules, and used can do nasty things playing with hidden pointers. ciao cate PS: use lkml rule: "do CC: to all relevant people!" --
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| David Miller | Slow DOWN, please!!! |
| Peter Zijlstra | [PATCH 00/23] per device dirty throttling -v8 |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Natalie Protasevich | [BUG] New Kernel Bugs |
git: | |
