Summary: | [WTF] Generic memoryFootprint() implementation should use bmalloc on Linux | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Zan Dobersek <zan> | ||||
Component: | New Bugs | Assignee: | Zan Dobersek <zan> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | aperez, Basuke.Suzuki, don.olmstead, Hironori.Fujii, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Zan Dobersek
2019-04-16 01:42:35 PDT
Created attachment 367519 [details]
Patch
Comment on attachment 367519 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367519&action=review r=me with nits > Source/WTF/wtf/generic/MemoryFootprintGeneric.cpp:29 > +#if !(defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) && OS(LINUX) Remove OS(LINUX) there's no reason for this to be OS specific. > Source/WTF/wtf/generic/MemoryFootprintGeneric.cpp:37 > +#if !(defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) && OS(LINUX) Same Comment on attachment 367519 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367519&action=review >> Source/WTF/wtf/generic/MemoryFootprintGeneric.cpp:29 >> +#if !(defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) && OS(LINUX) > > Remove OS(LINUX) there's no reason for this to be OS specific. Didn't mention it in ChangeLog when I should have, but this bmalloc API at the moment is only implemented and exposed on Linux and iOS platforms. Given this implementation of WTF::memoryFootprint() would be used only on Linux (iOS has a different one), the OS(LINUX) guard is used here. The PlayStation port also uses this implementation, but I'm not sure whether bmalloc is used there and/or if the underlying OS identifies as Linux-like to the point of being able to use the bmalloc implementation. Comment on attachment 367519 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367519&action=review >>> Source/WTF/wtf/generic/MemoryFootprintGeneric.cpp:29 >>> +#if !(defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) && OS(LINUX) >> >> Remove OS(LINUX) there's no reason for this to be OS specific. > > Didn't mention it in ChangeLog when I should have, but this bmalloc API at the moment is only implemented and exposed on Linux and iOS platforms. Given this implementation of WTF::memoryFootprint() would be used only on Linux (iOS has a different one), the OS(LINUX) guard is used here. > > The PlayStation port also uses this implementation, but I'm not sure whether bmalloc is used there and/or if the underlying OS identifies as Linux-like to the point of being able to use the bmalloc implementation. We use bmalloc, but we didn't follow memoryFootprint() API yet. We'll see how we can do that and enable here also after doing that. Committed r244496: <https://trac.webkit.org/changeset/244496> |