+1 To Robert's patch here, with the reflection I provided as separate patch!
The reflection will be needed for the nuke of Unsafe anyways, because we need HotspotMXBean to detect reference size (which is still important, I just reviewed the code using all parts using the constant from RAMUsageEstimator). If one runs on compact profile on 64 bit without HotspotBean it will just assume that a refenece pointer is 8 bytes. If its uses compressed Oops we just calculate the size of arrays wrong (by factor of 2).
In my opinion: We should have good constants for huge systems, because with heap sizes around several gigabytes, the memory reporting by Lucene/Solr/Elasticsearch should not be wrong by factor 2 for some structures. I don't care about static object headers or alignments, if they are wrong - it has less effect (because we generally have few huge objects in FST/Filter/DocValues).
If you use compact profile on some platform, the ram usage reporting is in most cases not so interesting, because you are already limited by the platform...