Re: Doubt regarding memory

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

 



On Wednesday 28 February 2007 10:47, Sandeep Sanjay Patil wrote:
> > So what you are saying that on a 1gb,2gb,..,4gb ram, ZONE_HIGH_MEM will
> > always be 128mb. However, those 128mb in the MMU will not enjoy identity
> > mapping (i.e. will have to use page tables entries translations). In
> > addition, if we have 4gb ram, the additional physical 3gb after the first
> > 1gb. i.e. 0x40000000 - 0xffffffff will be mapped to virtual addresses 0x0
> > - 0xc0000000? (major weirdness btw).
>
>    No, AFAIK the last 128mb will be dynamically changed to use the
> physical memory above 896mb. If not to be used in the kernel, the higher
> physical addresses will only be mapped for the applications... CMIIW...

What do you mean by dynamically. Applications, from what i understand, can 
allocate in physical memory wherever they want (translated, wherever the 
kernel wants in there) in the free normal/dma/himem zones (as long as it is 
not used by the kernel). I.e. this allocation to high mem, i think, should 
not be different from the kernel usual allocation.

>
> > Btw, when i only have 512mb. Does that mean that the virtual address
> > which is in excess of the virtual-physical ram identity mapping, (if i
> > have enough swap space) will be from 0x0-0xc0000000?
>
>   I didnt really get this part...

What i meant to ask was. Even if we have 512mb ram in the system, each process 
can address from 0gb-3gb virtual address space? and it will be taken from 
normal/dma/himem+ zones where ever it is free in physical memory right?
Though i did not get if there is some order/rule to that allocation in 
physical memory.

>
> > Btw, is it also possible for two processes to have the same virtual
> > address and context switch will redirect each time (using different page
> > table of the process) the same virtual address to different physical
> > address.
>
>   This is what happens...

Really, cool. At the beginning i thought that all processes can address only 
0-3gb of virtual memory together and not 0-3gb each (as it is really is). 
Though, i knew each process lives in it's own world where it thinks it runs 
alone having the processor to itself.

>
> cheers
> sandeep

-- 
Regards,
        Tzahi.
--
Tzahi Fadida
Blog: http://tzahi.blogsite.org | Home Site: http://tzahi.webhop.info
WARNING TO SPAMMERS:  see at 
http://members.lycos.co.uk/my2nis/spamwarning.html

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