Skip to content

Commit

Permalink
weak: fix typo in warning about tiny allocator optimization
Browse files Browse the repository at this point in the history
Fixes #70972.

Change-Id: Ib04c2a3129a1da651a0b4674b372aec73966115a
Reviewed-on: https://go-review.googlesource.com/c/go/+/638377
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
mknyszek committed Dec 24, 2024
1 parent b9955f0 commit 772f024
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/weak/pointer.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import (
// nil, even after an object is no longer referenced, the runtime is allowed to
// perform a space-saving optimization that batches objects together in a single
// allocation slot. The weak pointer for an unreferenced object in such an
// allocation may never be called if it always exists in the same batch as a
// allocation may never become nil if it always exists in the same batch as a
// referenced object. Typically, this batching only happens for tiny
// (on the order of 16 bytes or less) and pointer-free objects.
type Pointer[T any] struct {
Expand Down

0 comments on commit 772f024

Please sign in to comment.