TechSpot

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

By nagamohan_p
Aug 30, 2005
  1. 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
     
  2. Nodsu

    Nodsu TS Rookie Posts: 9,431

    You can use the /dev/mem and /dev/kmem devices.
     
  3. nagamohan_p

    nagamohan_p TS Rookie Topic Starter

    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:
     
  4. Nodsu

    Nodsu TS Rookie Posts: 9,431

    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.
     
Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.