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

Issue 222028: Rounds up VirtualAlloc calls on windows to dwAllocationGranularity to prevent fragmentation (Closed)

Created:
11 years, 3 months ago by jamesr
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Rounds up VirtualAlloc calls on windows to dwAllocationGranularity to prevent fragmentation Actually on Windows VirtualAlloc'ated address might have bigger alignment than reported by SYSTEM_INFO.dwPageSize, see SYSTEM_INFO.dwAllocationGranularity. As coalescing of spans in tcmalloc requires that those spans are physically adjacent, using smaller alignment inhibited coalescing. Additional benefit is we now require ways less memory at least in some case. Also adds assert()s for alignment values that would lead to pathological virtual address space waste. No current callers pass in alignment values other than kPageSize and it's unlikely anyone will. Original patch and discussion was at http://codereview.chromium.org/235003 Patch by: antonm@chromium.org BUG=22701 TEST=Manually checked test page that did 10m XHR. Memory use goes from >2GB and a crash to 102MB. Membuster shows the change is roughly within noise and possibly a very slight regression ( <<5% ). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27162

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -19 lines) Patch
M third_party/tcmalloc/port.cc View 2 chunks +18 lines, -19 lines 2 comments Download

Messages

Total messages: 5 (0 generated)
jamesr
Follow up to http://codereview.chromium.org/235003 with assert()s for bad alignment values.
11 years, 3 months ago (2009-09-24 22:33:15 UTC) #1
jar (doing other things)
http://codereview.chromium.org/222028/diff/1/2 File third_party/tcmalloc/port.cc (right): http://codereview.chromium.org/222028/diff/1/2#newcode198 Line 198: // Safest is to make actual_size same as ...
11 years, 3 months ago (2009-09-24 23:24:34 UTC) #2
jar (doing other things)
I should have added... with fixes to the comments: LGTM
11 years, 3 months ago (2009-09-24 23:26:03 UTC) #3
jamesr
On 2009/09/24 23:26:03, jar wrote: > I should have added... with fixes to the comments: ...
11 years, 3 months ago (2009-09-25 01:42:41 UTC) #4
Anton Muhin
11 years, 3 months ago (2009-09-25 12:28:51 UTC) #5
just in case: LGTM

On Fri, Sep 25, 2009 at 5:42 AM,  <jamesr@chromium.org> wrote:
> On 2009/09/24 23:26:03, jar wrote:
>>
>> I should have added... with fixes to the comments: LGTM
>
> http://src.chromium.org/viewvc/chrome?view=3Drev&revision=3D27162
>
> Thanks a lot to jar for the review and antonm for the patch. =A0I modifie=
d the
> comments as you suggested, with some edits to make it a bit more readable=
.
> =A0I
> think the TODO(antonm) is still valid since currently the interface doesn=
't
> allow for the caller to deal with alignment issues generally.
>
> http://codereview.chromium.org/222028
>

Powered by Google App Engine
This is Rietveld 408576698