Re: Question about memory size and performance

Randall R Schulz <[email protected]> Tue, 11 Dec 2007 11:42:56 -0800
Newsgroups gmane.comp.windows.devel.java.advanced
Message-ID <[email protected]>
>>On Tuesday 11 December 2007 11:32, Mann, Ivan H wrote:
>>
>> Mann, Ivan H wrote:
>>> I recall the studies from the 60's on memory allocation, and the
>>> answer then was that after a while memory fragmentation gets to be a
>>> serious problem as requests for memory blocks of different sizes are
>>> made and they use most of pieces of existing blocks, but leave small
>>> pieces that can be too small.  The result is that you can have a lot
>>> of memory not being used but not available because it exists in
>>> blocks smaller than the requests that you make.
>>>
>>>
>> I'm pretty sure Java moves things in memory to defragment the heap.
>>
>> Thats why a reference isnt a pointer.
>
> I remember years ago reading that as a design goal, but I don't know
> if today's jvm does that.

How could it not? It's a generational collector and it has to be able to
move things from one generation to another.


> My expectation would be that it does this at garbage collection time.
>
> Ivan

Probably. There seems to be little reason to do it at any other time.


Randall Schulz

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com