Package org.github.jamm.utils

# Class ArrayMeasurementUtils

java.lang.Object
org.github.jamm.utils.ArrayMeasurementUtils

public final class ArrayMeasurementUtils extends Object
Utility methods to measure arrays.

## Method Summary

Modifier and Type
Method
Description
`static long`
`computeArraySize(int arrayBaseOffset, int length, int elementSize, int objectAlignment)`
Computes the size of an array from its base offset, length, elementSize and object alignment.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### computeArraySize

public static long computeArraySize(int arrayBaseOffset, int length, int elementSize, int objectAlignment)
Computes the size of an array from its base offset, length, elementSize and object alignment.

Parameters:
  `arrayBaseOffset` - the array base offset
  `length` - the array length
  `elementSize` - the size of the array elements
  `objectAlignment` - the object alignment (padding) in bytes
Returns:
  the size of the array