Read with Formatting | Join TechSpot! (it's free)



How to get image of RAM in Linux & Solaris through C++ Programming

nagamohan_p
08-30-2005, 03:49 AM
I wish to get entire contents of RAM in Linux and Solaris through C++ Programming... Is there any file or API for retrieving the contents... Please send me as soon as possible or advice some guidelines

Nodsu
08-30-2005, 04:48 AM
You can use the /dev/mem and /dev/kmem devices.

Ad
08-30-2005, 04:48 AM

nagamohan_p
09-01-2005, 08:56 AM
Hi Nodsu,
ThankQ for u'r kind suggestion to access RAM, but i am in the half way i.e., I read some documentations in google regarding /dev/mem that it has some disadvantages( i.e., it works properly in x86 family, it is not compatible.) While accessing the RAM, sometimes executed properly and atlast it is crashed.
Is there any other way for accessing RAM or should /dev/mem be considered as final solution...
I'm eagerly waiting for u'r reply... please send me asap that our project deadline is reached. :blackeye:

Nodsu
09-01-2005, 09:12 AM
One of the cornerstones of modern computer is protected memory and there is no easy way to access the whole virtual memory space. There is no other easy access to system memory AFAIK.

I imagine one could hook to some debugging routines in the kernel, but that would even more cumbersome and less portable. Or maybe force the relevant memory pages to be swapped out and then read in the right part of the swap file.

 Tech News

 Downloads
Copyright © 1998-2008 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.