Re: [rvm-research] How to record objects' read/write times
王晨曦 <[email protected]>
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <CAECgty8qTSL1jgdMBDTBrt8ABDCMg+ydxpbgzKqCjLReNVaVyQ@mail.gmail.com> |
Hi ,robin
I have checked the function collectionRequired() in Gen.java again,
I think I understand the nursery's initial size.(The question 1))
The function virtualMemoryExhausted() can control the initial size of nursery.
private boolean virtualMemoryExhausted() {
return ((int)(getCollectionReserve() * WORST_CASE_COPY_EXPANSION))
>= getMaturePhysicalPagesAvail();
}
WORST_CASE_COPY_EXPANSION = 1.5f
So,I think in the begin ,the ratio of nursery / immix can't exceed
1/1.5 ; Or It will trigger a minor GC.
So,I guess the initial nursery size is less than 1/2.5 (40%) of the
initial heap.(The initial heap size is 50M, I have seen.)
May be other space occupy some heap, so the initial nursery size is 16M.
Is this right?
On Sun, May 31, 2015 at 6:44 PM, 王晨曦 <[email protected]> wrote:
> Hi,Robin
>
> Thank you for your help very much!! I have confirmed what you have
> said. I can get most of them.
> But I still have some doubts that I can't understand.
>
>
>>
>>> 1)
>>> So,my first doubt is I can't find which variable to describe the
>>> "the nursery size is set to 1/2 the available heap size ".
>>> I mean the program set which variable to control this ?
>>> May be the nursery size is set as the min of the range
>>> (fixedNursery.value) ,and round to the max size (boundedNursery.value)
>>> when the program is running ?
>>
>> Look at the method Plan#getPagesReserved().
>
> 1)
> I have read this function, I think this function is about to get the
> current reserved pages. I can't find its connection with the Nursery's
> initial size in GenImmix.
>
> But I really have seen that the nursery's initial size is 16M, half of
> the nursery's max size( default max size is 32M).
>
>
>>
>> No, all spaces dynamically resize, but they don't change their virtual
>> memory. When we use a nursery in high memory, the base virtual address
>> of the nursery is fixed at build time. When we talk about "resizing"
>> spaces, we simply mean using more or less of the space that has been set
>> aside.
>>
>
> 2)
> I have read the functions about how to manage the nursery space
> (GenImmix config).
> In my opinion ,The nursery is a MonotonePageResource , and the nursery
> space is allocated in the top of the heap.
> But,when allocate pages ,the nursery's allocator will start from the
> nursery's low address ( Monotone.cursor / nursery.start ) to the heap
> end ( Monotone.sentinel ).
> And the nursery's virtual memory will not be occupied by other
> discontiguous space,even if the nursery only use little of it.
>
> Are these right?
>
>
>
> Than you !
>
>
> --
> ChenXi.Wang
--
ChenXi.Wang
------------------------------------------------------------------------------
_______________________________________________
Jikesrvm-researchers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers