xref: /aosp_15_r20/external/cronet/base/memory/page_size.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
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 BASE_MEMORY_PAGE_SIZE_H_
6 #define BASE_MEMORY_PAGE_SIZE_H_
7 
8 #include <stddef.h>
9 
10 #include "base/base_export.h"
11 
12 namespace 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 BASE_EXPORT size_t GetPageSize();
19 
20 }  // namespace base
21 
22 #endif  // BASE_MEMORY_PAGE_SIZE_H_
23