This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Memory usage for RNG

 
bashir adil
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic