Re: The biggest continual physical memory we can get during the kernel running?

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

 



I'm not sure about Linux (and am curious) but in C this is defined by the
heap size.
The heap normally is located between the end of (i)data and the lowest the
stack(s) can/might go (assuming a full descending stack).
This is decided at link time and is runtime constant.

Also note that - regardless of Linux or not - the heap *CAN* fragment,
meaning that if you request smaller parts of mem and do not return them in
the right sequence, you might suddenly end up with half of the previously
available *contiguous* memory - or less. (assuming you were able to request
large physical memory)
AFAIK, if you return the heap in the same sequence as you alloc'd it (ie.
in reverse), you should be guaranteed to prevent fragmentation
("memory leaks") on all compilers.

HTH
Best regards,
Kris



On Mon, 30 Mar 2009 20:13:50 +0800, Peter Chen <hzpeterchen@xxxxxxxxx>
wrote:
> Hi all,
> 
> I have two questions about alloc continual physical memory, hope you can
> give me some tips.
> 
> 1. How biggest continual physical memory the kernel can be ensured to
> give during the kernel running?
> 2. What is the threshold value for  alloc_page and kmalloc?
> 
> This memory is demanded to alloc dymatically, not using alloc_bootmem
> during the system bootup.
> 
> Thank you in advance
> 
> Best Regards,
> Peter Chen

--
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