Hello
In the code :
unsigned long size = 2621440;
unsigned int order;
order = get_order(size);
__get_free_pages(GFP_KERNEL,order);
1.What value get_order(size) will return ?
2.What calculation get_order() is doing ?
Thank You
Hello
In the code :
unsigned long size = 2621440;
unsigned int order;
order = get_order(size);
__get_free_pages(GFP_KERNEL,order);
1.What value get_order(size) will return ?
2.What calculation get_order() is doing ?
Thank You
What do
- the manual pages tell you?
- searching the web tell you?
- reading the source code tell you?
If you're starting to mess about on kernel side, you really should be doing all these things before asking.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Wow
Take it easy man
If you don't know how to answer this one that is ok
Let somebody how can
You should really check out LXR, they have a repository of all the Linux kernel source code in an easily browsable format.
But the way you've gone about trying to answer your question is awful: double posting, not putting any effort into the question first, and telling someone off because they didn't immediately answer your question.
Kernel modules are very powerful (and potentially dangerous) programs, and writing them requires learning and hard work, even if you already know C. You need to be prepared to encounter difficulty and have the resources to solve it, rather than pasting a couple lines of code and expecting someone to explain them.