Memory management questions

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

 



Hi all,

I've always thinked that paging or virtual memory was practical to avoid memory fragmentation. I thinked that you can map contiguous virtual pages to non contiguous physical page frames.
But let's take a look at the macros __va(x) and __pa(x) :
#define __pa(x) ((unsigned long)x-PAGE_OFFSET)
#define __va(x) ((unsigned long)x+PAGE_OFFSET)
PAGE_OFFSET is a constant. For me, this means that virtual contiguous adresses have to be mapped to contiguous physical adresses. Am I wrong ?:)



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