Esempio n. 1
0
 public static void AddMemoryPressure(long bytesAllocated)
 {
     if (bytesAllocated <= 0L)
     {
         throw new ArgumentOutOfRangeException("bytesAllocated", Environment.GetResourceString("ArgumentOutOfRange_NeedPosNum"));
     }
     if (4 == IntPtr.Size && bytesAllocated > (long)int.MaxValue)
     {
         throw new ArgumentOutOfRangeException("pressure", Environment.GetResourceString("ArgumentOutOfRange_MustBeNonNegInt32"));
     }
     GC._AddMemoryPressure((ulong)bytesAllocated);
 }