dotnet / dotnet/runtime

[browser][coreCLR] consider `sbrk()` -> `memory.grow()` optimization skipping `memset(adr, 0)`

Open
#127,600 2 comments 1 reaction 1 assignee Claimed by @pavelsavara View on GitHub
arch-wasm area-GC-coreclr os-browser tenet-performance
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

consider `sbrk()` -> `memory.grow()` optimization skipping `memset(adr, 0)`

> it's not a valid assumption to make that the memory returned is going to be 'pristine'.
> The easiest counterexample where it wouldn't hold is with debugging modes that "poison" allocated memory. Another example is if posix_memalign needed to use the newly allocated memory for some internal data structure, but then freed that data structure before returning.

by @SingleAccretion, full discussion https://github.com/dotnet/runtime/pull/127328#discussion_r3160809884

- [ ] measure impact to startup performance

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.