02-15-2002
The mem driver does let you access physical memory. You can seek and read (or write) to any physical address.
The kmem driver gives you access to the kernel's virtual address space.
But both are intended to be used from userland. If, for some reason, you want to do this stuff inside a driver, you should examine the code for the kmem and mem pseudodrivers to see how they work on your system. Then you should do the same thing in your driver.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
It is just a general question....is there a limit on the memory? I am looking into a process to store image files on the unix server which will be accessed by the application, and I just wonder if there is any limit regarding the physical or virtual memory. I am very new to unix, so thanks for... (1 Reply)
Discussion started by: cchien
1 Replies
2. Shell Programming and Scripting
What command can i use to get the physical and virtual memory of a database? (7 Replies)
Discussion started by: tads98
7 Replies
3. UNIX for Advanced & Expert Users
vmstat -P commands gives me an output as shown at the end of this message.
my first question is about the difference between "total physical memory" and "total physical memory use"
"Total Physical Memory" -"Total Physical Memory Use"
524288 pages-524026 pages= 262 pages
does it mean... (0 Replies)
Discussion started by: gfhgfnhhn
0 Replies
4. Solaris
HI
Please help me how to check the physical memory, model name and hardisk information. (5 Replies)
Discussion started by: jeelans
5 Replies
5. Solaris
what is the command to find the physical memory in soalris OS and how to find whether paging is happening or not ? (2 Replies)
Discussion started by: jayaramanit
2 Replies
6. Solaris
Hi,
Im working on Solaris 9 on SPARC-32 bit running on an Ultra-80, and I have to find out the following:-
1. Total Physical Memory in the system(total RAM).
2. Available Physical Memory(i.e. RAM Usage)
3. Total (Logical) Memory in the system
4. Available (Logical) Memory.
I know... (4 Replies)
Discussion started by: 0ktalmagik
4 Replies
7. Solaris
Is it possible to restrict physical memory in solaris zone with zone.max-locked-memory just like we can do with rcapd ? I do not want to used rcapd (1 Reply)
Discussion started by: fugitive
1 Replies
8. AIX
IBM says we cannot expand our physical memory on our 570's without upgrading all the existing DIMMS since all slots are currently full. Is it really so difficult for IBM to build servers that leave a couple vacant slots for future expansion? A technical explanation would be greatly appreciated.... (2 Replies)
Discussion started by: 1computerman
2 Replies
9. UNIX for Dummies Questions & Answers
I am currently running unix open server 6.0 on a Dell Power Edge R720. The system will be running fine when the blue screen appears and states the system has performed a physical memory dump in # of ticks. I reboot the system and all looks well. Running diagnostics does not show anything wrong. The... (1 Reply)
Discussion started by: rformt
1 Replies
10. Solaris
Below is Physical Memory result :
-bash-3.00$ prtconf | grep "Memory size"
Memory size: 36854 Megabytes
-bash-3.00$ vmstat 1 2 | tail -1
0 0 0 28220616 1318888 15 143 0 0 0 0 0 253 2 15 0 5215 14989 5917 7 0 93
and the script i have to calculate this in Percentage is :
#!/bin/sh... (3 Replies)
Discussion started by: mjoshi010207
3 Replies
MEM(4) Linux Programmer's Manual MEM(4)
NAME
mem, kmem, port - system memory, kernel memory and system ports
DESCRIPTION
mem is a character device file that is an image of the main memory of the computer. It may be used, for example, to examine (and even
patch) the system.
Byte addresses in mem are interpreted as physical memory addresses. References to nonexistent locations cause errors to be returned.
Examining and patching is likely to lead to unexpected results when read-only or write-only bits are present.
It is typically created by:
mknod -m 660 /dev/mem c 1 1
chown root:kmem /dev/mem
The file kmem is the same as mem, except that the kernel virtual memory rather than physical memory is accessed.
It is typically created by:
mknod -m 640 /dev/kmem c 1 2
chown root:kmem /dev/kmem
port is similar to mem, but the I/O ports are accessed.
It is typically created by:
mknod -m 660 /dev/port c 1 4
chown root:mem /dev/port
FILES
/dev/mem
/dev/kmem
/dev/port
SEE ALSO
chown(1), mknod(1), ioperm(2)
COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 1992-11-21 MEM(4)