1 // Copyright 2021 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_MEMORY_PAGE_SIZE_H_ 6 #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_MEMORY_PAGE_SIZE_H_ 7 8 #include <cstddef> 9 10 #include "partition_alloc/partition_alloc_base/component_export.h" 11 12 namespace partition_alloc::internal::base { 13 14 // Returns the number of bytes in a memory page. Do not use this to compute 15 // the number of pages in a block of memory for calling mincore(). On some 16 // platforms, e.g. iOS, mincore() uses a different page size from what is 17 // returned by GetPageSize(). 18 PA_COMPONENT_EXPORT(PARTITION_ALLOC_BASE) size_t GetPageSize(); 19 20 } // namespace partition_alloc::internal::base 21 22 #endif // PARTITION_ALLOC_PARTITION_ALLOC_BASE_MEMORY_PAGE_SIZE_H_ 23