code: private static int getAlignment() {
          RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
          for (String arg : runtimeMxBean.getInputArguments()) {
              if (arg.startsWith("-XX:ObjectAlignmentInBytes=")) {
                  try {
                      return Integer.parseInt(arg.substring("-XX:ObjectAlignmentInBytes=".length()));
                  } catch (Exception e){}
              }
          }
          return 8;
      }
docs: check if we have a non-standard object alignment we need to round to