1234567891011121314151617 |
- /*
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/.
- */
- package main
- import (
- "unsafe"
- "golang.org/x/sys/cpu"
- )
- const CacheLineSize = unsafe.Sizeof(cpu.CacheLinePad{})
- // TODO Is there a better way than this lousy guess?
- const L1CacheSize = 512 * CacheLineSize
|