RESOLVED FIXED 196963
[WTF] Generic memoryFootprint() implementation should use bmalloc on Linux
https://bugs.webkit.org/show_bug.cgi?id=196963
Summary [WTF] Generic memoryFootprint() implementation should use bmalloc on Linux
Zan Dobersek
Reported 2019-04-16 01:42:35 PDT
[WTF] Generic memoryFootprint() implementation should use bmalloc on Linux
Attachments
Patch (2.33 KB, patch)
2019-04-16 02:42 PDT, Zan Dobersek
don.olmstead: review+
Zan Dobersek
Comment 1 2019-04-16 02:42:59 PDT
Don Olmstead
Comment 2 2019-04-16 09:02:45 PDT
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
Zan Dobersek
Comment 3 2019-04-17 01:01:18 PDT
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.
Basuke Suzuki
Comment 4 2019-04-17 12:23:55 PDT
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.
Zan Dobersek
Comment 5 2019-04-21 23:23:02 PDT
Radar WebKit Bug Importer
Comment 6 2019-04-21 23:24:24 PDT
Note You need to log in before you can comment on or make changes to this bug.