LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-03-2014, 11:50 AM   #1
gundog126
LQ Newbie
 
Registered: Oct 2014
Posts: 8

Rep: Reputation: Disabled
How can i determine memory size and number of physical pages with this info.


[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009f7ff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009f800-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000dfcbefff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000dfcbf000-0x00000000dfdbefff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000dfdbf000-0x00000000dfebefff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x00000000dfebf000-0x00000000dfef4fff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000dfef5000-0x00000000dfefffff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000dff00000-0x00000000dfffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fec10000-0x00000000fec10fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000ffe00000-0x00000000ffffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x0000000206ffffff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000207000000-0x000000021effffff] reserved
 
Old 10-03-2014, 12:24 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,762
Blog Entries: 4

Rep: Reputation: 78
0x000000021effffff is 9,110,028,287 bytes divided by 1024 is 8,896,511KB divided by 1024 is 8687MB divided by 1024 is 8GB.
Pages are usually (but not always) 4096 bytes (it is hardware dependent). Use "$ getconf PAGESIZE" or perhaps "$ getconf PAGE_SIZE" to confirm.
 
1 members found this post helpful.
Old 10-03-2014, 12:49 PM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Memory size (for practical purposes) is just the lines marked "usable". The highest physical address (21effffff) is not an indication of memory size.

Truncating to whole pages in hex:
9f-0 + dfcbf-100 + dff00-dfef5 + 207000-100000 = 1E6C69

which is 1993833 4K pages
which is 7788.41 MB
 
1 members found this post helpful.
Old 10-03-2014, 01:00 PM   #4
gundog126
LQ Newbie
 
Registered: Oct 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bulliver View Post
0x000000021effffff is 9,110,028,287 bytes divided by 1024 is 8,896,511KB divided by 1024 is 8687MB divided by 1024 is 8GB.
Pages are usually (but not always) 4096 bytes (it is hardware dependent). Use "$ getconf PAGESIZE" or perhaps "$ getconf PAGE_SIZE" to confirm.
Excellent! thanks. both getconf PAGESIZE & getconf PAGE_SIZE returned 4096. How do you determine which line to calculate? I thought
[mem 0x0000000000100000-0x00000000dfcbefff]=3754684415 was where my memory is determined. I have 2x4 and free -m gives Mem: 7592 so 3754684415 x 2=7,509,368,830
 
Old 10-03-2014, 01:32 PM   #5
bulliver
Senior Member
 
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,762
Blog Entries: 4

Rep: Reputation: 78
I just used the highest memory address for my figures. As johnsfine mentioned, not all of it is usable.
 
  


Reply

Tags
memory


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How-to determine the number of physical CPUs lusine Linux - Newbie 3 06-08-2012 12:04 PM
Determine Physical RAM size skistner Linux - Hardware 18 02-22-2010 01:57 PM
how to determine the size of physical memory on the PCB? fnems Linux - Embedded & Single-board computer 2 08-14-2009 07:40 PM
determine the physical size of the hard disk hoffies Linux - Hardware 3 11-15-2007 04:13 AM
Determine physical disk size Kristijan Linux - General 4 01-23-2005 06:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:06 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