• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reading RAM

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

How can i read all computer memory with java ? is it possible?
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no.
you can read all of userspace memory.
You can not read kernel space memory
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To compound the issue.... What is user space and kernal space is determined by the MMU. And this is specific to a program. In other words, there many be multiple value at address XXXX, since XXXX is a virtual address.


So... even if you use JNI, which will get your program to C/C++, it will not be able to access all of the physical memory in the system.

Henry
 
Ender Ak
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks a lot for your answers...
i think it is very tough subject.. i will resarch computer memory and how it works..
so if found something usefull i will share..
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, you want to have your cake and eat it too. :-). Java is a closed system, meaning it really does not allow the programmer much power on system side operations such as reading in raw bytes of data directly from the memory. You would need to have references to memory locations by means of object references.

However if you wish to access main memory for specific requirements, you may want to use native bindings and allow C or C++ to work at the memory and framing some sort of object which can be sent back to the Java programs at the higher levels.

This is yes, not for the beginner Java geek. Might take quite a bit of time and research. Study on JNI and a little bit of C, will help you out.
reply
    Bookmark Topic Watch Topic
  • New Topic