Changeset 244496 in webkit


Ignore:
Timestamp:
Apr 21, 2019 11:22:59 PM (5 years ago)
Author:
zandobersek@gmail.com
Message:

[WTF] Generic memoryFootprint() implementation should use bmalloc on Linux
https://bugs.webkit.org/show_bug.cgi?id=196963

Reviewed by Don Olmstead.

Have the generic memoryFootprint() implementation use bmalloc's
memoryFootprint() API on Linux, whenever the system malloc option is
not enabled. Limitation to Linux platforms is due to the bmalloc
implementation being limited to those configurations (excluding iOS
which doesn't use MemoryFootprintGeneric.cpp).

  • wtf/PlatformWPE.cmake: Switch to building MemoryFootprintGeneric.cpp.
  • wtf/generic/MemoryFootprintGeneric.cpp:

(WTF::memoryFootprint):

Location:
trunk/Source/WTF
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r244489 r244496  
     12019-04-21  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [WTF] Generic memoryFootprint() implementation should use bmalloc on Linux
     4        https://bugs.webkit.org/show_bug.cgi?id=196963
     5
     6        Reviewed by Don Olmstead.
     7
     8        Have the generic memoryFootprint() implementation use bmalloc's
     9        memoryFootprint() API on Linux, whenever the system malloc option is
     10        not enabled. Limitation to Linux platforms is due to the bmalloc
     11        implementation being limited to those configurations (excluding iOS
     12        which doesn't use MemoryFootprintGeneric.cpp).
     13
     14        * wtf/PlatformWPE.cmake: Switch to building MemoryFootprintGeneric.cpp.
     15        * wtf/generic/MemoryFootprintGeneric.cpp:
     16        (WTF::memoryFootprint):
     17
    1182019-04-19  Ryosuke Niwa  <rniwa@webkit.org>
    219
  • trunk/Source/WTF/wtf/PlatformWPE.cmake

    r241654 r244496  
    1515
    1616    generic/MainThreadGeneric.cpp
     17    generic/MemoryFootprintGeneric.cpp
    1718    generic/WorkQueueGeneric.cpp
    1819
     
    2425
    2526    linux/CurrentProcessMemoryStatus.cpp
    26     linux/MemoryFootprintLinux.cpp
    2727    linux/MemoryPressureHandlerLinux.cpp
    2828
  • trunk/Source/WTF/wtf/generic/MemoryFootprintGeneric.cpp

    r237099 r244496  
    2727#include <wtf/MemoryFootprint.h>
    2828
     29#if !(defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) && OS(LINUX)
     30#include <bmalloc/bmalloc.h>
     31#endif
     32
    2933namespace WTF {
    3034
    3135size_t memoryFootprint()
    3236{
     37#if !(defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) && OS(LINUX)
     38    return bmalloc::api::memoryFootprint();
     39#else
    3340    return 0;
     41#endif
    3442}
    3543
Note: See TracChangeset for help on using the changeset viewer.