public virtual void TestReferenceSize()
{
//LUCENENET: The JVM is obviously not relevant to our purposes
//if (!SupportedJVM)
//{
// Console.Error.WriteLine("WARN: Your JVM does not support certain Oracle/Sun extensions.");
// Console.Error.WriteLine(" Memory estimates may be inaccurate.");
// Console.Error.WriteLine(" Please report this to the Lucene mailing list.");
// Console.Error.WriteLine("JVM version: " + RamUsageEstimator.JVM_INFO_STRING);
// Console.Error.WriteLine("UnsupportedFeatures:");
// foreach (JvmFeature f in RamUsageEstimator.UnsupportedFeatures)
// {
// Console.Error.Write(" - " + f.ToString());
// if (f == RamUsageEstimator.JvmFeature.OBJECT_ALIGNMENT)
// {
// Console.Error.Write("; Please note: 32bit Oracle/Sun VMs don't allow exact OBJECT_ALIGNMENT retrieval, this is a known issue.");
// }
// Console.Error.WriteLine();
// }
//}
Assert.IsTrue(RamUsageEstimator.NUM_BYTES_OBJECT_REF == 4 || RamUsageEstimator.NUM_BYTES_OBJECT_REF == 8);
if (!Constants.JRE_IS_64BIT)
{
assertEquals("For 32bit JVMs, reference size must always be 4?", 4, RamUsageEstimator.NUM_BYTES_OBJECT_REF);
}
}