Re: How to know the maximum memory pages that can be allocated?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



thank you pradeep singh for the sharing.

In the /proc/meminfo, I saw this (and my questions follows):

MemTotal:      3046884 kB
MemFree:       1502524 kB ===>this is the physical free memory?
Buffers:         90820 kB
Cached:         624168 kB
SwapCached:          0 kB
Active:         964128 kB
Inactive:       519928 kB
HighTotal:     2162240 kB
HighFree:       758656 kB===>this is the total free memory available
via using __get_free_pages(__GFP_HIGHMEM)?
LowTotal:       884644 kB
LowFree:        743868 kB===>this is the total free memory available
via using __get_free_pages(GFP_KERNEL)?
SwapTotal:     4192924 kB
SwapFree:      4192924 kB

Thanks for the sharing....

On Mon, Sep 29, 2008 at 11:50 PM, pradeep singh <2500.pradeep@xxxxxxxxx> wrote:
> On Mon, Sep 29, 2008 at 9:48 AM, Peter Teoh <htmldeveloper@xxxxxxxxx> wrote:
>> I would like to know the maximum memory I can allocate (using
>> alloc_page()) in GFP_KERNEL and __GFP_HIGHMEM memory area - how can I
>> know that?
>
> Peter, I doubt you can precisely know that at any given time. :)
> A lot of issues come into picture, the order of pages you want to
> allocate, fragmentation, pages used as anonymous pages , pages for
> other dynamic allocation which is required by kernel etc.
> All these make it really difficult for precise answer.
> Approximation I think you do it using some simple maths.
>
> HTH,
>
-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux