|
1. Plays some Minecraft
2. See's Battery go down from 85% to 76%
3. 9-Cell battery is almost dead in under 1 hour and 30 minutes
4. Looks at Processes
5. javaw.exe Memory: 600,000k (average is about 520,000k)
6. Me: O_-
WHY MUST IT KILL MY BATTERY!!! |
|
myrkosJoin Date: 2010-09-06 Post Count: 8072 |
cuz it's Java |
|
Aaaboy97Join Date: 2009-04-05 Post Count: 6612 |
I once made a terrain generator in ROBLOX, and the memory was at 1.6 million k
and then I tried re-running it and it crashed at 300,000k memory with an "Out of memory" error |
|
blockooJoin Date: 2007-11-08 Post Count: 17202 |
it's horribly inefficient |
|
stravantForum ModeratorJoin Date: 2007-10-22 Post Count: 2893 |
Because, that's the cost of JIT compilation, maintaining a lot of extra data about the program execution so that it can be run in an optimized way in real-time. |
|
blockooJoin Date: 2007-11-08 Post Count: 17202 |
lol, JIT
reminds me of a slang word that idiots at my school say when they want to sound tough |
|
|
@blockoo
same here lol
i recall jit means someone younger then you :P
-Smith |
|
|
@blockoo
that's also a floridian term, only people in florida use it
*grins*
-Smith |
|
sncplay42Join Date: 2008-11-27 Post Count: 11891 |
>Plays game that works with a whole bunch of 16*16*128 grids
>Blames VM for memory usage |
|
|
@SNCPlay42
I know I know....VM is inefficient itself. |
|
|
nightnameJoin Date: 2008-06-10 Post Count: 8960 |
That is quite strange. In all of the java applications I have made, they have all taken quite a small sum of memory.
Even applications which are ridiculed with bad maths. |
|
|
Blame notch, java doesn't take up alot of memory. Notch just doesn't clean things the code doesn't need. If you ever looked at his code, it is messy. I know that when you change worlds, it creates a new world class, and never destroys the old one, nor does it reuse the old one. |
|
|
"Because, that's the cost of JIT compilation, maintaining a lot of extra data about the program execution so that it can be run in an optimized way in real-time."
I always thought that it was because Java keeps memory in standby to allow for faster access. :o |
|
myrkosJoin Date: 2010-09-06 Post Count: 8072 |
Popinman, where else would it keep the memory? On the hard drive? |
|
|
@myrkos
On a CD, duh! Why do you think you need to buy most games with a CD?
They write every variable on the CD, at runtime! |
|
|
@Myrkos
Where did that question come from? |
|
|
@popinman322
"I always thought that it was because Java keeps memory in standby"
The fastest to access thing is the random access memory. If not in the RAM, where would the memory be? On the hard drive? |
|
myrkosJoin Date: 2010-09-06 Post Count: 8072 |
>Where did that question come from?
"I always thought that it was because Java keeps memory in standby to allow for faster access. :o"
What do you mean by standby? |
|
|
@Myrkos
Allocated and ready for use when required by the VM. |
|
myrkosJoin Date: 2010-09-06 Post Count: 8072 |
You mean the VM allocates lots of unnecessary RAM for when the application might need it it doesn't have to spend time allocating then? |
|
|
myrkosJoin Date: 2010-09-06 Post Count: 8072 |
K then that's somewhat correct... it does do that, which indeed make allocations faster than C(++) allocations, but it also requires the garbage collector to come in and clean up every now and then. |
|
|
We always have the Runtime!
Runtime.getRuntime().gc() // :D |
|
|
What? Java really does that?
But..
If it was to make accessing memory faster, I'd understand, but doing that just to make ALLOCATIONS faster? I'd call that more a waste of memory than anything else.. |
|