Thread: Question about _get_free_pages()

  1. #1
    Registered User
    Join Date
    Mar 2012

    Question about _get_free_pages()

    In the code :

    unsigned long size = 2621440;
    unsigned int order;
    order = get_order(size);

    1.What value get_order(size) will return ?
    2.What calculation get_order() is doing ?

    Thank You

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    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.

  3. #3
    Registered User
    Join Date
    Mar 2012
    Take it easy man
    If you don't know how to answer this one that is ok
    Let somebody how can

  4. #4
    Registered User
    Join Date
    Dec 2011
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 03-23-2011, 09:00 AM
  2. *szString = things question/memory question
    By Jang in forum C Programming
    Replies: 3
    Last Post: 01-20-2011, 04:59 AM
  3. Newbish Question file reading question....
    By kas2002 in forum C Programming
    Replies: 23
    Last Post: 05-17-2007, 12:06 PM
  4. Self regiserting DLLs question and libraries question.
    By ApocalypticTime in forum Windows Programming
    Replies: 2
    Last Post: 03-22-2003, 02:02 PM
  5. A question of color...(not a racial question)
    By Sebastiani in forum Windows Programming
    Replies: 7
    Last Post: 01-15-2003, 08:05 PM