LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-12-2015, 10:19 AM   #1
nyamiaka
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 directly.so 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
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

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

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:44 AM.

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