Changeset 232059 in webkit


Ignore:
Timestamp:
May 22, 2018 3:49:17 AM (6 years ago)
Author:
Yusuke Suzuki
Message:

Define GIGACAGE_ALLOCATION_CAN_FAIL on Linux
https://bugs.webkit.org/show_bug.cgi?id=183329

Reviewed by Michael Catanzaro.

We specify GIGACAGE_ALLOCATION_CAN_FAIL 1 in Linux since
Linux can fail to mmap if vm.overcommit_memory = 2.
Users can enable Gigacage if users enable overcommit_memory.

  • bmalloc/Gigacage.h:
Location:
trunk/Source/bmalloc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/bmalloc/ChangeLog

    r232052 r232059  
     12018-05-22  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        Define GIGACAGE_ALLOCATION_CAN_FAIL on Linux
     4        https://bugs.webkit.org/show_bug.cgi?id=183329
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        We specify `GIGACAGE_ALLOCATION_CAN_FAIL 1` in Linux since
     9        Linux can fail to `mmap` if `vm.overcommit_memory = 2`.
     10        Users can enable Gigacage if users enable overcommit_memory.
     11
     12        * bmalloc/Gigacage.h:
     13
    1142018-05-21  Yusuke Suzuki  <utatane.tea@gmail.com>
    215
  • trunk/Source/bmalloc/bmalloc/Gigacage.h

    r231337 r232059  
    4242#define JSVALUE_GIGACAGE_SIZE 0x400000000llu
    4343#define GIGACAGE_ALLOCATION_CAN_FAIL 0
     44#endif
     45
     46// In Linux, if `vm.overcommit_memory = 2` is specified, mmap with large size can fail if it exceeds the size of RAM.
     47// So we specify GIGACAGE_ALLOCATION_CAN_FAIL = 1.
     48#if BOS(LINUX)
     49#undef GIGACAGE_ALLOCATION_CAN_FAIL
     50#define GIGACAGE_ALLOCATION_CAN_FAIL 1
    4451#endif
    4552
Note: See TracChangeset for help on using the changeset viewer.