The APIs needed for the memory peak are available in the current public SDKs for macOS and iOS, therefore these implementations can move to OpenSource.
Created attachment 375821 [details] Patch
Attachment 375821 [details] did not pass style-queue: ERROR: Source/WTF/wtf/spi/darwin/ProcessMemoryFootprint.h:35: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/wtf/spi/darwin/ProcessMemoryFootprint.h:35: Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5] ERROR: Source/WTF/wtf/spi/darwin/ProcessMemoryFootprint.h:36: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/wtf/spi/darwin/ProcessMemoryFootprint.h:36: Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5] ERROR: Source/WTF/wtf/spi/darwin/ProcessMemoryFootprint.h:38: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 5 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 375821 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=375821&action=review r=me > Source/JavaScriptCore/jsc.cpp:144 > + MemoryFootprint(const ProcessMemoryFootprint& o) > + : ProcessMemoryFootprint(o) style nit: let's give it a name instead of "o" > Source/WTF/wtf/spi/darwin/ProcessMemoryFootprint.h:46 > +#if !PLATFORM(IOS_FAMILY_SIMULATOR) && __has_include(<libproc.h>) > +# include <libproc.h> > +# if RUSAGE_INFO_CURRENT >= 4 > +# define HAS_MAX_FOOTPRINT > +# if defined(RLIMIT_FOOTPRINT_INTERVAL) && __has_include(<libproc_internal.h>) \ > + && ((PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000) \ > + || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400)) > +# define HAS_RESET_FOOTPRINT_INTERVAL > +# define MAX_FOOTPRINT_FIELD ri_interval_max_phys_footprint > +# include <libproc_internal.h> > +# else > +# define MAX_FOOTPRINT_FIELD ri_lifetime_max_phys_footprint > +# endif > +# else > +# define HAS_ONLY_PHYS_FOOTPRINT > +# endif > +#endif I respect the indentation here
(In reply to Saam Barati from comment #3) > Comment on attachment 375821 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=375821&action=review > > r=me > > > Source/JavaScriptCore/jsc.cpp:144 > > + MemoryFootprint(const ProcessMemoryFootprint& o) > > + : ProcessMemoryFootprint(o) > > style nit: let's give it a name instead of "o" Called it "src".
Committed r248441: <https://trac.webkit.org/changeset/248441>
<rdar://problem/54094516>