Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Issue 1977493003: Remove accounting from ArrayBuffer::Allocator (Closed)

Created:
4 years, 7 months ago by Michael Lippautz
Modified:
4 years, 7 months ago
Reviewers:
haraken, sof
CC:
chromium-reviews, blink-reviews, blink-reviews-wtf_chromium.org, blink-reviews-bindings_chromium.org, Mikhail
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove accounting from ArrayBuffer::Allocator Memory is already accounted in V8 when using this allocator. This avoids double-accounting which potentially also reduces (useless) GCs which are triggered when reaching certain thresholds. BUG=chromium:611688 LOG=N Committed: https://crrev.com/9019cf320fdcc79ec31ecfe89f07783a726156a2 Cr-Commit-Position: refs/heads/master@{#394108}

Patch Set 1 #

Patch Set 2 : Fix at call site #

Patch Set 3 : Fix typo #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp View 1 2 4 chunks +4 lines, -4 lines 2 comments Download

Messages

Total messages: 17 (7 generated)
Michael Lippautz
ptal and let me know if you'd like them reshuffled differently (Also landing a change ...
4 years, 7 months ago (2016-05-13 08:25:27 UTC) #3
haraken
Instead of introducing the "accounted" and "unaccounted" API, can we move the AdjustAmountOfMemory call out ...
4 years, 7 months ago (2016-05-13 08:53:48 UTC) #4
Michael Lippautz
On 2016/05/13 08:53:48, haraken wrote: > Instead of introducing the "accounted" and "unaccounted" API, can ...
4 years, 7 months ago (2016-05-13 10:01:27 UTC) #6
Michael Lippautz
ping ;)
4 years, 7 months ago (2016-05-17 10:50:19 UTC) #7
haraken
Sorry, I missed this. LGTM.
4 years, 7 months ago (2016-05-17 11:02:24 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1977493003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1977493003/40001
4 years, 7 months ago (2016-05-17 11:21:28 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 7 months ago (2016-05-17 13:16:17 UTC) #12
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/9019cf320fdcc79ec31ecfe89f07783a726156a2 Cr-Commit-Position: refs/heads/master@{#394108}
4 years, 7 months ago (2016-05-17 13:17:49 UTC) #14
sof
https://codereview.chromium.org/1977493003/diff/40001/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp File third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp (right): https://codereview.chromium.org/1977493003/diff/40001/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp#newcode142 third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp:142: if (s_adjustAmountOfExternalAllocatedMemoryFunction) What if allocateMemory() isn't able to allocate ...
4 years, 7 months ago (2016-05-17 21:05:04 UTC) #16
Michael Lippautz
4 years, 7 months ago (2016-05-18 08:05:09 UTC) #17
Message was sent while issue was closed.
https://codereview.chromium.org/1977493003/diff/40001/third_party/WebKit/Sour...
File third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp (right):

https://codereview.chromium.org/1977493003/diff/40001/third_party/WebKit/Sour...
third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp:142: if
(s_adjustAmountOfExternalAllocatedMemoryFunction)
On 2016/05/17 21:05:04, sof wrote:
> What if allocateMemory() isn't able to allocate |sizeInBytes|, don't you
either
> need to re-balance the books or delay this call until after the allocation
(has
> succeeded)?

Thanks, you are right. I was not aware that a failing allocation does not
trigger an OOM but rather represents a valid state. 

See: https://codereview.chromium.org/1993623002/

Powered by Google App Engine
This is Rietveld 408576698