]> Cypherpunks repositories - gostls13.git/commit
runtime: tidy Context allocation
authorAustin Clements <austin@google.com>
Tue, 19 Nov 2019 19:48:17 +0000 (14:48 -0500)
committerAustin Clements <austin@google.com>
Thu, 16 Apr 2020 13:02:31 +0000 (13:02 +0000)
commit2a029b3f26169be7c89cb2cdcc3db4b5d097a8b8
treea461a6ea8e76d93e1f32c9adaef2f851ceefab7f
parentb89f4c67200e6128e1dc936a9362b07900c2af3e
runtime: tidy Context allocation

The Context object we pass to GetThreadContext on Windows must be 16
byte-aligned. We also can't allocate in the contexts where we create
these, so they must be stack-allocated. There's no great way to do
this, but this CL makes the code at least a little clearer, and makes
profilem and preemptM more consistent with each other.

Change-Id: I5ec47a27d7580ed6003030bf953e668e8cae2cef
Reviewed-on: https://go-review.googlesource.com/c/go/+/207967
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
src/runtime/os_windows.go