physical memory layout

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

 



Hi guys,

I am trying to do a walk through the physical memory. In
"Understanding the Linux Virtual Memory Manager" Fig 4.1 Kernel
Address Space, it shows:


|[kernel image][struct page map (mem_map)]|
|
PAGE_OFFSET

Is the ending point of kernel image the address of _end symbol that
can be found in System.map? Does the struct page map begins
immediately after the kernel image ?

I wrote a simple module:
void memory (void)
{
    int i;
    zone_t *tmp;
    for (i=0; i<MAX_NR_ZONES * MAX_NR_NODES; i++) {
        tmp = zone_table[i];
        if (tmp != NULL) {
            printk("zone_mem_map 0x%lx zone_start_paddr 0x%lx
zone_start_mapnr 0x%lx\n", tmp->zone_mem_map, tmp->zone_start_paddr,
tmp->zone_start_mapnr);
        }
   }
}

I noticed that zone_mem_map address is lower than the address given by _end. 
Shouldn't it be above the _end symbol ?

Thanks for any advices..

-- 
cheers,
jon

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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