[ajug-members] java object allocation and memory

Wilson, Jeff jw9615 at att.com
Wed Sep 10 09:29:17 EDT 2008


Unless you are doing Real-Time programming, you shouldn't be calling GC
anyways. It runs whenever the VM wants to run it.

Predicting memory allocation is tricky in Java. The VM reserves all
kinds of memory areas [eden area, permanent area, others] and uses those
to allocate objects. In general the VM uses those pre-allocated memory
areas until it needs more, and then allocates more memory from the OS. 

Also, objects are typically very small.

+jeff (MJW)
---

"History will be kind to me for I intend to write it."
 -W. Churchill 

---------------------------------------------
M. Jeff Wilson, Lead Member Technical Staff
AT&T Services, Inc.
Operations & Service Dev
jw9615 at att.com 
+1 404.499.7235

-----Original Message-----
From: mcdaniel [mailto:521 at ofig.org] 
Sent: Tuesday, September 09, 2008 8:20 PM
To: ajug-members at ajug.org
Subject: Re: [ajug-members] java object allocation and memory

this makes it look like i was calling on the gc call to free memory but 
i was not; i did this w/ zero/none of them too- what keeps the 
freeMemory call's value close like those are?  why does it not go up
more?

barclay

mcdaniel wrote:
> why does the free-memory not change much with object allocation? - i 
> keep playing with this and don't see it...
> -attached-
>
> barclay
>
>
------------------------------------------------------------------------
>

_______________________________________________
ajug-members mailing list
ajug-members at ajug.org
http://www.ajug.org/mailman/listinfo/ajug-members

*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA623





More information about the ajug-members mailing list