• Bruce Dawson's avatar
    Reduce stack sizes for 32-bit Chrome · 24a8a2eb
    Bruce Dawson authored
    32-bit Chrome continues to hit out-of-memory crashes. Some of these are
    presumed to be out-of-address-space crashes which are particularly easy
    to hit when running on 32-bit Windows where 32-bit Chrome will only get
    2 GiB of address space.
    
    This change lowers the default stack size for Chrome to 0.5 MiB. This
    will not affect Chrome's main thread (it uses a fiber to create a larger
    stack) but it will affect Windows thread pool worker threads and a few
    other threads that we do not directly control.
    
    This change also lowers the stack size for threads that Chrome creates,
    but to minimize risk this is only done when running on 32-bit Windows,
    where the risk of running out of address space is most severe.
    
    This has been seen to save 25 MiB of address space (50 threads going
    from 1 MiB to 0.5 MiB).
    
    Bug: 981238, 1023804
    Change-Id: Ia7fc03e0d4b79550cb67cb491892beaae08d5c0d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2461589Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
    Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
    Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#816653}
    24a8a2eb
platform_thread_win.cc 16.9 KB