-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JSC] Use libpas' zeroed-allocation for zero-filling typed array allo…
…cations https://bugs.webkit.org/show_bug.cgi?id=259765 rdar://113315414 Reviewed by Mark Lam. It turned out that large typed array can consume long time for zeroing its backing store. But libpas already knows that this is zero-filled or not (for example, newly allocated pages are zeroed), and libpas have try_allocate_zeroed APIs to return efficiently zero-filled memory. This patch leverages this for TypedArray allocations. * Source/JavaScriptCore/runtime/ArrayBuffer.cpp: (JSC::ArrayBufferContents::tryAllocate): * Source/JavaScriptCore/runtime/JSArrayBufferView.cpp: (JSC::JSArrayBufferView::ConstructionContext::ConstructionContext): * Source/WTF/wtf/FastMalloc.cpp: (WTF::fastZeroedMalloc): (WTF::tryFastZeroedMalloc): * Source/WTF/wtf/Gigacage.cpp: (Gigacage::tryZeroedMalloc): (Gigacage::zeroedMalloc): * Source/WTF/wtf/Gigacage.h: * Source/bmalloc/bmalloc/bmalloc.h: (bmalloc::api::tryZeroedMalloc): (bmalloc::api::zeroedMalloc): Canonical link: https://commits.webkit.org/266536@main
- Loading branch information
1 parent
dc06957
commit ad82b55
Showing
6 changed files
with
97 additions
and
24 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
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
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