Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Large usage of RAM in java
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Large usage of RAM in java



Greetings,

I tried both programs on my MacBook Pro:
1) simpe while loop in C
int main() { 
int i = 0;
while(1)
 i++;
return 0; 
       }
2) Simple while loop in Java:
class While {
 public static void main (String[] args) {
 int i= 0;
 while (true) {
 i++; 
}
 } 
}

  The first one used 576.00 KB of RAM, 1 Thread and the second one USED 7.63MB, 10 Threads.
Why? Is it the JVM? Why are there 10 Threads?

Any help will be appreciated.
Thanks,

Majd Kokaly
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.