[
https://issues.apache.org/jira/browse/LUCENE-6239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14316743#comment-14316743
]
Uwe Schindler commented on LUCENE-6239:
---------------------------------------
Hi,
I just found out: With Java 1.7+, all the Unsafe constants are exposed as
public static final variables. So we dont need to directly access the unsafe
constant.
By that it would be possible to get the REFERENCE_SIZE without hotspot bean
just be getting a static final int constant... The same applies fo the JVM
bitness.
Would this be a valid use? In fact there can break nothing, it could just be
that our code cabnot see those constants, but thats not different from the
HotspotBean.
We just did not use that in RAMUsageEstimator before, because in Java 6, those
constants were not there! On the other hand, in Java 9, Unsafe is likely to
disappear, so I think we should really work without Unsafe.
> Remove RAMUsageEstimator Unsafe calls
> -------------------------------------
>
> Key: LUCENE-6239
> URL: https://issues.apache.org/jira/browse/LUCENE-6239
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
> Attachments: LUCENE-6239.patch
>
>
> This is unnecessary risk. We should remove this stuff, it is not needed here.
> We are a search engine, not a ram calculator.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]