Buffer.Unix.cs 822 B

1234567891011121314151617181920212223242526
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. #if BIT64
  5. using nuint = System.UInt64;
  6. #else
  7. using nuint = System.UInt32;
  8. #endif
  9. namespace System
  10. {
  11. public static partial class Buffer
  12. {
  13. #if ARM64
  14. // Managed code is currently faster than glibc unoptimized memmove
  15. // TODO-ARM64-UNIX-OPT revisit when glibc optimized memmove is in Linux distros
  16. // https://github.com/dotnet/coreclr/issues/13844
  17. private const nuint MemmoveNativeThreshold = ulong.MaxValue;
  18. #elif ARM
  19. private const nuint MemmoveNativeThreshold = 512;
  20. #else
  21. private const nuint MemmoveNativeThreshold = 2048;
  22. #endif
  23. }
  24. }