示例#1
0
 /// <summary>
 ///     Returns the size in bytes occupied by an AtomicIntArray instance.
 /// </summary>
 /// <param name="instance">instance for whch to calculate the size.</param>
 /// <returns>The size of the instance in bytes.</returns>
 public static int GetEstimatedFootprintInBytes(AtomicIntArray instance)
 {
     return instance.Length * sizeof(int) + 16 + IntPtr.Size; // array reference & overhead
 }
示例#2
0
 /// <summary>
 ///     Returns the size in bytes occupied by an AtomicIntArray instance.
 /// </summary>
 /// <param name="instance">instance for whch to calculate the size.</param>
 /// <returns>The size of the instance in bytes.</returns>
 public static int GetEstimatedFootprintInBytes(AtomicIntArray instance)
 {
     // ReSharper disable ArrangeRedundantParentheses SA1407
     return((instance.Length * sizeof(int)) + 16 + IntPtr.Size); // array reference & overhead
     // ReSharper restore ArrangeRedundantParentheses
 }