constants.go 486 B

1234567891011121314151617181920
  1. /*
  2. * This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at https://mozilla.org/MPL/2.0/.
  5. */
  6. package main
  7. import (
  8. "unsafe"
  9. "golang.org/x/sys/cpu"
  10. )
  11. const SizeCacheLine = unsafe.Sizeof(cpu.CacheLinePad{})
  12. // TODO Is there a better way than this lousy guess?
  13. const SizeCacheL1 = 512 * SizeCacheLine
  14. // Cap line buffer
  15. const MaxSizeBufferLine = 1024 * 1024 * 1024