The question come again.
Hi, everyone on LKML:
I am reading slab implement code (2.6.11.11).
The function kmalloc() is one of the frequently used funtions in
kernel , of course,
it is one of my focuses.
But I found it may call __you_cannot_kmalloc_that_much(). but I can
not get where is
defined. I tried to search in LXR , Source navigator, and run grep in include, mm directory, but nothing to return.
What's secret in here? Waitting for any answer.
Thanks.
liyu
NOW~
Quoted 3 lines · On Sun, 10 Jul 2005 11:28:20 +0800, "liyu@WAN" said:
But I found it may call
__you_cannot_kmalloc_that_much(). but I can
not get where is
defined.
Note that you can only reach it if you have a *compile-time constant* of over 32M or so in size. If it's smaller, it will catch the appropriate if/then from kmalloc_sizes.h (and all the others removed by the optimizer).
And since there *isn't* a definition, you'll get a complaint when you try to link vmlinux - and the complaint will tell you where it's referenced.