]> Cypherpunks repositories - gostls13.git/commit
runtime: make zeroing of large objects containing pointers preemptible
authorMichael Anthony Knyszek <mknyszek@google.com>
Tue, 9 Apr 2024 03:56:40 +0000 (03:56 +0000)
committerMichael Knyszek <mknyszek@google.com>
Tue, 9 Apr 2024 14:35:47 +0000 (14:35 +0000)
commitde3a3c9ebc801c2cd3513a76676f1a26f600b51d
tree686d32b7facbaf27899ae57e89b8dc04217bd18d
parent9f3f4c64dbfd37ef9f7113708a706a8099d72fd9
runtime: make zeroing of large objects containing pointers preemptible

This change makes it possible for the runtime to preempt the zeroing of
large objects that contain pointers. It turns out this is fairly
straightforward with allocation headers, since we can just temporarily
tell the GC that there's nothing to scan for a large object with a
single pointer write (as opposed to trying to zero a whole bunch of
bits, as we would've had to do once upon a time).

Fixes #31222.

Change-Id: I10d0dcfa3938c383282a3eb485a6f00070d07bd2
Reviewed-on: https://go-review.googlesource.com/c/go/+/577495
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/malloc.go
src/runtime/mbitmap.go