This repository was archived by the owner on Nov 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 2525#include < string>
2626
2727template <typename StatVfsT> void Check (StatVfsT& sb) {
28+ #if defined(__x86_64__)
29+ // On x86_64 based 16kb page size targets, the page size in userspace is simulated to 16kb but
30+ // the underlying filesystem block size would remain unchanged, i.e., 4kb.
31+ // For more info:
32+ // https://source.android.com/docs/core/architecture/16kb-page-size/getting-started-cf-x86-64-pgagnostic
33+ EXPECT_EQ (4096 , static_cast <int >(sb.f_bsize ));
34+ #else
2835 EXPECT_EQ (getpagesize (), static_cast <int >(sb.f_bsize ));
36+ #endif
2937 EXPECT_EQ (0U , sb.f_bfree );
3038 EXPECT_EQ (0U , sb.f_ffree );
3139 EXPECT_EQ (255U , sb.f_namemax );
Original file line number Diff line number Diff line change 2727#include " utils.h"
2828
2929template <typename StatFsT> void Check (StatFsT& sb) {
30+ #if defined(__x86_64__)
31+ // On x86_64 based 16kb page size targets, the page size in userspace is simulated to 16kb but
32+ // the underlying filesystem block size would remain unchanged, i.e., 4kb.
33+ // For more info:
34+ // https://source.android.com/docs/core/architecture/16kb-page-size/getting-started-cf-x86-64-pgagnostic
35+ EXPECT_EQ (4096 , static_cast <int >(sb.f_bsize ));
36+ #else
3037 EXPECT_EQ (getpagesize (), static_cast <int >(sb.f_bsize ));
38+ #endif
3139 EXPECT_EQ (0U , sb.f_bfree );
3240 EXPECT_EQ (0U , sb.f_ffree );
3341 EXPECT_EQ (255 , static_cast <int >(sb.f_namelen ));
You can’t perform that action at this time.
0 commit comments