From 76e7bfbb4e3a6114a33c7dba666fdd26698bedc5 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 14 May 2025 15:53:58 -0400 Subject: runtime: move atoi to internal/runtime/strconv Moving to a smaller package allows its use in other internal/runtime packages. This isn't internal/strconvlite since it can't be used directly by strconv. For #73193. Change-Id: I6a6a636c9c8b3f06b5fd6c07fe9dd5a7a37d1429 Reviewed-on: https://go-review.googlesource.com/c/go/+/672697 Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI Auto-Submit: Michael Pratt --- src/runtime/malloc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime/malloc.go') diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index ffaf92debc..ccdebb26fb 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -630,7 +630,7 @@ func mallocinit() { } // Initialize the memory limit here because the allocator is going to look at it // but we haven't called gcinit yet and we're definitely going to allocate memory before then. - gcController.memoryLimit.Store(maxInt64) + gcController.memoryLimit.Store(math.MaxInt64) } // sysAlloc allocates heap arena space for at least n bytes. The @@ -1816,7 +1816,7 @@ func profilealloc(mp *m, x unsafe.Pointer, size uintptr) { func nextSample() int64 { if MemProfileRate == 0 { // Basically never sample. - return maxInt64 + return math.MaxInt64 } if MemProfileRate == 1 { // Sample immediately. -- cgit v1.3