GeeCON Prague 2014*
The moose likes Security and the fly likes Memory usage for RNG Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Security
Bookmark "Memory usage for RNG" Watch "Memory usage for RNG" New topic
Author

Memory usage for RNG

bashir adil
Greenhorn

Joined: Apr 16, 2013
Posts: 9

i am having the code for random number generation like this:



i want to find out the memory usage of this code. Kindly help
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1064
    
  10

bashir adil wrote:
i want to find out the memory usage of this code.


Why? What are you going to do with this information?

P.S. The code for class Random is available in the src.zip file that comes with the JDK distribution.
P.P.S. What makes this a 'security' issue?
bashir adil
Greenhorn

Joined: Apr 16, 2013
Posts: 9
i need to check out the memory usage of my whole program, but for this piece of code i am confused about itz memory usage.
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1064
    
  10

bashir adil wrote:i need to check out the memory usage of my whole program, but for this piece of code i am confused about itz memory usage.


Sorry but I think you have an impossible task. I'd be surprised if this is the only class you are 'confused about' since your program will likely be using hundreds of classes most being more complex than java.util.Random. What makes java.util.Random more confusing than say the String class or the PrintStream class that you use when using System.out ?
 
GeeCON Prague 2014
 
subject: Memory usage for RNG