aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/malloc.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2025-05-14 15:53:58 -0400
committerGopher Robot <gobot@golang.org>2025-05-19 12:46:19 -0700
commit76e7bfbb4e3a6114a33c7dba666fdd26698bedc5 (patch)
treea3c5738900dba5ff5e40f43ddda7dcb14b9ddae2 /src/runtime/malloc.go
parentd93bea0e59e51c2d85e69f28f09726b5c9fc81d2 (diff)
downloadgo-76e7bfbb4e3a6114a33c7dba666fdd26698bedc5.tar.xz
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 <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/malloc.go')
-rw-r--r--src/runtime/malloc.go4
1 files changed, 2 insertions, 2 deletions
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.