6992192: Need option to configure if direct memory is page aligned (XS)

David Holmes David.Holmes at oracle.com
Fri Oct 15 05:10:21 PDT 2010

Alan Bateman said the following on 10/15/10 22:04:
> David Holmes wrote:
>> Alan Bateman said the following on 10/15/10 21:50:
>>> David Holmes wrote:
>>>> :
>>>> Sorry but I don't understand why either of them are VM options when 
>>>> it would appear you could just do:
>>>> java -Dsun.nio.MaxDirectMemorySize=16M 
>>>> -Dsun.nio.PageAlignDirectMemory=true
>>> -XX:MaxDirectMemorySize is a long standing VM option, used in my 
>>> environments so I don't think we can change it.
>> You don't need to change it. All it does is set the property, so the 
>> user can do that too. You could deprecate the use of -XX option but it 
>> will still be there.
> It can't currently be set on the command line as it is overridden by the 
> VM. I believe that was the intention when this was added many years ago 
> (before my time). I don't have a strong objection to changing this but 
> it does mean that we would have to document/support these properties and 
> at the same time continue to support the long standing VM option.

Okay I see the VM code would have to be moved to change this. But it 
seems really strange to have this set up this way. Why disallow 
overriding with -D when the same user that puts the -D on the command 
line puts the -XX? Maybe this was some strange security thing where the 
VM was in a wrapper that could take -D args but not -XX and the VM 
settings were not to be modified.

Anyway I'll back off. It make me cringe, but I'll back off.


More information about the hotspot-runtime-dev mailing list