Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-12-2015, 10:19 AM   #1
LQ Newbie
Registered: Oct 2015
Posts: 3

Rep: Reputation: Disabled
linux kernel memory management

I have read that linux uses paging in its virtual memory model. In this model physical memory and the virtual memory is divided into blocks called pages each with a unique identification number . Processes access physical address indirectly via the page tables its only the kernel (and kernel rou ines) that accesses memory if a programmer wants to manage the memory of his program as in c language which does not have a garbage collector which memory does one manage the virtual or physical
Old 12-12-2015, 10:25 AM   #2
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 9,155

Rep: Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982
Old 12-12-2015, 01:48 PM   #3
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,843

Rep: Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472
The kernel itself only uses virtual memory - this is to provide the appearance of a contigueous memory range for itself. Then pages are allocations/recovered out of that - and the kernel itself pages data in/out of kernel memory.
Old 12-12-2015, 07:54 PM   #4
Senior Member
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 3,464

Rep: Reputation: 915Reputation: 915Reputation: 915Reputation: 915Reputation: 915Reputation: 915Reputation: 915Reputation: 915
Memory management, that is the mapping of virtual page numbers to physical, is done by the kernel and shielded from processes. There is no programming interface that allows a process to see what physical pages it uses.

The only exception to this rule is that a process can look at kernel memory /dev/kmem and, with the knowledge of kernel data structures, find out what mapping is effective at this point in time.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux Kernel Power Management Targeting Memory LXer Syndicated Linux News 0 04-10-2013 03:30 PM
understand linux kernel memory management hkonok Linux - Newbie 3 07-23-2012 06:14 AM
Memory management in 2.4/2.6 kernel Nayaka Linux - Kernel 3 12-27-2007 10:51 PM
memory management kernel 2.6.18 chiendarret Linux - Software 2 04-08-2007 12:28 AM
Kernel Memory Management meatbiscuit Linux - General 4 02-10-2006 06:41 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:09 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration