public static long toAddress(Object obj){
  Object[] array=new Object[]{obj};
  long baseOffset=unsafe.arrayBaseOffset(Object[].class);
  return normalize(unsafe.getInt(array,baseOffset));
}

public static long toAddress ( Object obj ) { Object [ ] array = new Object [ ] { obj } ; long baseOffset = unsafe . arrayBaseOffset ( Object [ ] . class ) ; return normalize ( unsafe . getInt ( array , baseOffset ) ) ; }
returns the address the object is located at < p > warning : this does not return a pointer , so be warned pointer arithmetic will not work .
