memoryFootprint should return size_t not optional<size_t>
[WebKit-https.git] / Source / WTF / wtf / cocoa / MemoryFootprintCocoa.cpp
index a00a68b..ad0e2a8 100644 (file)
 
 namespace WTF {
 
-std::optional<size_t> memoryFootprint()
+size_t memoryFootprint()
 {
     task_vm_info_data_t vmInfo;
     mach_msg_type_number_t count = TASK_VM_INFO_COUNT;
     kern_return_t result = task_info(mach_task_self(), TASK_VM_INFO, (task_info_t) &vmInfo, &count);
     if (result != KERN_SUCCESS)
-        return std::nullopt;
+        return 0;
     return static_cast<size_t>(vmInfo.phys_footprint);
 }