[webkit-reviews] review granted: [Bug 188091] Use SPI to compute the jetsam limit on iOS instead of hardcoding 840MB : [Attachment 345906] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 27 10:41:54 PDT 2018


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Saam Barati
<sbarati at apple.com>'s request for review:
Bug 188091: Use SPI to compute the jetsam limit on iOS instead of hardcoding
840MB
https://bugs.webkit.org/show_bug.cgi?id=188091

Attachment 345906: patch

https://bugs.webkit.org/attachment.cgi?id=345906&action=review




--- Comment #8 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 345906
  --> https://bugs.webkit.org/attachment.cgi?id=345906
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=345906&action=review

> Source/bmalloc/bmalloc/AvailableMemory.cpp:70
> +#if BPLATFORM(IOS)
> +#if __has_include(<System/sys/kern_memorystatus.h>)
> +extern "C" {
> +#include <System/sys/kern_memorystatus.h>
> +}
> +#else
> +extern "C" {
> +
> +typedef struct memorystatus_memlimit_properties {
> +    int32_t memlimit_active; 	       /* jetsam memory limit (in MB)
when process is active */
> +    uint32_t memlimit_active_attr;
> +    int32_t memlimit_inactive;	       /* jetsam memory limit (in MB)
when process is inactive */
> +    uint32_t memlimit_inactive_attr;
> +} memorystatus_memlimit_properties_t;
> +
> +#define MEMORYSTATUS_CMD_GET_MEMLIMIT_PROPERTIES 8
> +
> +}
> +#endif // __has_include(<System/sys/kern_memorystatus.h>)
> +
> +extern "C" {
> +int memorystatus_control(uint32_t command, int32_t pid, uint32_t flags, void
*buffer, size_t buffersize);
> +}
> +
> +#endif // BPLATFORM(IOS)

Should we introduce the concept of SPI headers in bmalloc?


More information about the webkit-reviews mailing list