diff options
Diffstat (limited to 'src/runtime/vgetrandom_linux.go')
| -rw-r--r-- | src/runtime/vgetrandom_linux.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/vgetrandom_linux.go b/src/runtime/vgetrandom_linux.go index 6ab12e3c67..8f39f6d3a6 100644 --- a/src/runtime/vgetrandom_linux.go +++ b/src/runtime/vgetrandom_linux.go @@ -46,7 +46,7 @@ func vgetrandomInit() { func vgetrandomGetState() uintptr { lock(&vgetrandomAlloc.statesLock) if len(vgetrandomAlloc.states) == 0 { - num := uintptr(ncpu) // Just a reasonable size hint to start. + num := uintptr(numCPUStartup) // Just a reasonable size hint to start. stateSizeCacheAligned := (vgetrandomAlloc.stateSize + cpu.CacheLineSize - 1) &^ (cpu.CacheLineSize - 1) allocSize := (num*stateSizeCacheAligned + physPageSize - 1) &^ (physPageSize - 1) num = (physPageSize / stateSizeCacheAligned) * (allocSize / physPageSize) |
