Jump to content
xisto Community
Sign in to follow this  
delivi

Accessing Physical Memory Important needed for project

Recommended Posts

Is there a way to access the contents of the physical memory from an application . please give details about the corresponding functions and libraries or apis to be used. I need this for my personal project.

Share this post


Link to post
Share on other sites

yep, you use a wonderful thing called pointers. Pretty much 'pointers' point to a memory location. So if you set a pointer as '0' it will point to memory location 0. if you set it to '14' it will point to location 14. this way, you can simply scan through memory by incrementing the pointer. I assume you're using C++, so, to declare a pointer:

 

int *myPointer;
This makes a new pointer titled myPointer that can only point to ints.

 

then, to change the address that a pointer pointers to:

myPointer = myPointer + whatever;
This adds whatever to the address number of myPointer.

 

then, to access the data in the pointer:

 

data = *myPointer;
This extracts the information from the memory location that myPointer is pointing to.

 

If you're still confused, sorry I didn't explain it better. Also, there's heaps of information around on the web. Just search for "C++ pointers" or something and you'll find loads of simpler tutorials.

Cheers. :)

Share this post


Link to post
Share on other sites

Thanks switch, Actually I want to access the entire physical memory and store it as a file, i am want to create a program like the hibernate functionality in windows XP. So please kindly help me.

Share this post


Link to post
Share on other sites

Thanks switch,

 

Actually I want to access the entire physical memory and store it as a file, i am want to create a program like the hibernate functionality in windows XP. So please kindly help me.

225027[/snapback]


I don't think it is possible unless it is built into operating system. Any good OS (I don't even consider DOS a OS) will protect the memory access by bounding it within the allocated logical block. If you try to access memory which is not allocated to your program, it will be terminated by your os.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.