Changeset 237399 in webkit
- Timestamp:
- Oct 24, 2018 2:01:27 PM (5 years ago)
- Location:
- trunk/Source/bmalloc
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/bmalloc/ChangeLog
r237080 r237399 1 2018-10-24 Alexey Proskuryakov <ap@apple.com> 2 3 Add BPLATFORM(IOS_FAMILY) 4 https://bugs.webkit.org/show_bug.cgi?id=190878 5 6 Reviewed by Saam Barati. 7 8 * bmalloc/AvailableMemory.cpp: 9 (bmalloc::memorySizeAccordingToKernel): 10 (bmalloc::computeAvailableMemory): 11 * bmalloc/AvailableMemory.h: 12 (bmalloc::isUnderMemoryPressure): 13 * bmalloc/BPlatform.h: 14 * bmalloc/Gigacage.h: 15 * bmalloc/Logging.cpp: 16 (bmalloc::logVMFailure): 17 * bmalloc/VMAllocate.h: 18 (bmalloc::vmPageSizePhysical): 19 * bmalloc/bmalloc.h: 20 * bmalloc/darwin/MemoryStatusSPI.h: 21 1 22 2018-10-12 Ryan Haddad <ryanhaddad@apple.com> 2 23 -
trunk/Source/bmalloc/bmalloc/AvailableMemory.cpp
r234328 r237399 27 27 28 28 #include "Environment.h" 29 #if BPLATFORM(IOS )29 #if BPLATFORM(IOS_FAMILY) 30 30 #include "MemoryStatusSPI.h" 31 31 #endif … … 35 35 #include <mutex> 36 36 #if BOS(DARWIN) 37 #if BPLATFORM(IOS )37 #if BPLATFORM(IOS_FAMILY) 38 38 #import <algorithm> 39 39 #endif … … 54 54 static size_t memorySizeAccordingToKernel() 55 55 { 56 #if BPLATFORM(IOS_ SIMULATOR)56 #if BPLATFORM(IOS_FAMILY_SIMULATOR) 57 57 BUNUSED_PARAM(availableMemoryGuess); 58 58 // Pretend we have 1024MB of memory to make cache sizes behave like on device. … … 76 76 #endif 77 77 78 #if BPLATFORM(IOS )78 #if BPLATFORM(IOS_FAMILY) 79 79 static size_t jetsamLimit() 80 80 { … … 93 93 #if BOS(DARWIN) 94 94 size_t sizeAccordingToKernel = memorySizeAccordingToKernel(); 95 #if BPLATFORM(IOS )95 #if BPLATFORM(IOS_FAMILY) 96 96 sizeAccordingToKernel = std::min(sizeAccordingToKernel, jetsamLimit()); 97 97 #endif … … 122 122 } 123 123 124 #if BPLATFORM(IOS )124 #if BPLATFORM(IOS_FAMILY) 125 125 MemoryStatus memoryStatus() 126 126 { -
trunk/Source/bmalloc/bmalloc/AvailableMemory.h
r217918 r237399 33 33 size_t availableMemory(); 34 34 35 #if BPLATFORM(IOS )35 #if BPLATFORM(IOS_FAMILY) 36 36 struct MemoryStatus { 37 37 MemoryStatus(size_t memoryFootprint, double percentAvailableMemoryInUse) … … 62 62 inline bool isUnderMemoryPressure() 63 63 { 64 #if BPLATFORM(IOS )64 #if BPLATFORM(IOS_FAMILY) 65 65 return percentAvailableMemoryInUse() > memoryPressureThreshold; 66 66 #else -
trunk/Source/bmalloc/bmalloc/BPlatform.h
r233192 r237399 54 54 55 55 #if BOS(DARWIN) && !defined(BUILDING_WITH_CMAKE) 56 #if TARGET_OS_I PHONE56 #if TARGET_OS_IOS 57 57 #define BPLATFORM_IOS 1 58 58 #if TARGET_OS_SIMULATOR 59 59 #define BPLATFORM_IOS_SIMULATOR 1 60 60 #endif 61 #endif 62 #if TARGET_OS_IPHONE 63 #define BPLATFORM_IOS_FAMILY 1 64 #if TARGET_OS_SIMULATOR 65 #define BPLATFORM_IOS_FAMILY_SIMULATOR 1 66 #endif 61 67 #elif TARGET_OS_MAC 62 68 #define BPLATFORM_MAC 1 … … 64 70 #endif 65 71 66 #if BPLATFORM(MAC) || BPLATFORM(IOS )72 #if BPLATFORM(MAC) || BPLATFORM(IOS_FAMILY) 67 73 #define BPLATFORM_COCOA 1 68 74 #endif … … 223 229 #define BATTRIBUTE_PRINTF(formatStringArgument, extraArguments) __attribute__((__format__(printf, formatStringArgument, extraArguments))) 224 230 225 #if (BPLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || BPLATFORM(IOS)231 #if BPLATFORM(MAC) || BPLATFORM(IOS_FAMILY) 226 232 #define BUSE_OS_LOG 1 227 233 #endif 228 234 229 #if !defined(BUSE_EXPORT_MACROS) && (BPLATFORM(MAC) || BPLATFORM(IOS ))235 #if !defined(BUSE_EXPORT_MACROS) && (BPLATFORM(MAC) || BPLATFORM(IOS_FAMILY)) 230 236 #define BUSE_EXPORT_MACROS 1 231 237 #endif … … 239 245 #define ENABLE_PHYSICAL_PAGE_MAP 0 240 246 241 #if ((BPLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000) || (BPLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 50000) || (BPLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 120000)) \ 242 && (BCPU(ARM64) || BCPU(ARM)) 247 #if BPLATFORM(IOS_FAMILY) && (BCPU(ARM64) || BCPU(ARM)) 243 248 #define BUSE_CHECK_NANO_MALLOC 1 244 249 #else -
trunk/Source/bmalloc/bmalloc/Gigacage.h
r232059 r237399 60 60 61 61 #if ((BOS(DARWIN) || BOS(LINUX)) && \ 62 (BCPU(X86_64) || (BCPU(ARM64) && !defined(__ILP32__) && (!BPLATFORM(IOS ) || __IPHONE_OS_VERSION_MIN_REQUIRED >= 110300))))62 (BCPU(X86_64) || (BCPU(ARM64) && !defined(__ILP32__) && (!BPLATFORM(IOS_FAMILY) || BPLATFORM(IOS))))) 63 63 #define GIGACAGE_ENABLED 1 64 64 #else -
trunk/Source/bmalloc/bmalloc/Logging.cpp
r223936 r237399 32 32 #endif 33 33 34 #if BPLATFORM(IOS )34 #if BPLATFORM(IOS_FAMILY) 35 35 #include <CoreFoundation/CoreFoundation.h> 36 36 #include <mach/exception_types.h> … … 47 47 void logVMFailure(size_t vmSize) 48 48 { 49 #if BPLATFORM(IOS )49 #if BPLATFORM(IOS_FAMILY) 50 50 const mach_exception_data_type_t kExceptionCode = 0xc105ca11; 51 51 CFStringRef description = CFStringCreateWithFormat(kCFAllocatorDefault, nullptr, CFSTR("bmalloc failed to mmap %lu bytes"), vmSize); -
trunk/Source/bmalloc/bmalloc/VMAllocate.h
r234913 r237399 97 97 inline size_t vmPageSizePhysical() 98 98 { 99 #if BPLATFORM(IOS )99 #if BPLATFORM(IOS_FAMILY) 100 100 return vm_kernel_page_size; 101 101 #else -
trunk/Source/bmalloc/bmalloc/bmalloc.h
r232269 r237399 106 106 } 107 107 108 #if BPLATFORM(IOS )108 #if BPLATFORM(IOS_FAMILY) 109 109 inline size_t memoryFootprint() 110 110 { -
trunk/Source/bmalloc/bmalloc/darwin/MemoryStatusSPI.h
r234326 r237399 27 27 #include "BPlatform.h" 28 28 29 #if BPLATFORM(IOS )29 #if BPLATFORM(IOS_FAMILY) 30 30 31 31 #if __has_include(<System/sys/kern_memorystatus.h>) … … 52 52 } 53 53 54 #endif // BPLATFORM(IOS )54 #endif // BPLATFORM(IOS_FAMILY)
Note: See TracChangeset
for help on using the changeset viewer.