-
Notifications
You must be signed in to change notification settings - Fork 17.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime, cmd/link: optimize memory allocation on wasm
WebAssembly's memory is contiguous. Allocating memory at a high address also allocates all memory up to that address. This change reduces the initial memory allocated on wasm from 1GB to 16MB by using multiple heap arenas and reducing the size of a heap arena. Fixes #27462. Change-Id: Ic941e6edcadd411e65a14cb2f9fd6c8eae02fc7a Reviewed-on: https://go-review.googlesource.com/c/go/+/170950 Run-TryBot: Richard Musiol <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
- Loading branch information
Showing
2 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
460f9c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a data point, initial reports from @Yaoir when testing this earlier today across several mobile devices are positive. No out of memory errors, when previously there were.
Looks really good. 😄