于 2013年01月14日 04:54, Cong Ding 写道: > On Sun, Jan 13, 2013 at 9:10 AM, Chen Gang F T > <[email protected]> wrote: >> > all together: >> > kfree() should use 'const void *' as parameter type >> > the free() of C Library is incorrect (it use void *). > you are definitely wrong. both of them are correct - it's the > difference between kernel space and user space. >
for API features, they are should be no different. "- From a very obvious and very *real* caller perspective, 'free()' really doesn't change the thing the pointer points to. It does something totally different: it makes the *pointer* itself invalid." "we want the types to be as tight as possible" so should use 'const void *' both for 'kfree()' and 'free()' . -- Chen Gang Flying Transformer
<<attachment: chen_gang_flying_transformer.vcf>>

