Skip to content

Commit

Permalink
wip windows: page size workaround
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo committed Oct 24, 2023
1 parent 440c221 commit 791af36
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions userspace/falco/app/actions/print_page_size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ falco::app::run_result falco::app::actions::print_page_size(falco::app::state& s
{
if(s.options.print_page_size)
{
#ifndef _WIN32
long page_size = getpagesize();
#else
SYSTEM_INFO sysInfo;

GetSystemInfo(&sysInfo);

long page_size = sysInfo.dwPageSize;
#endif
if(page_size <= 0)
{
return run_result::fatal("\nUnable to get the system page size through 'getpagesize()'\n");
Expand Down

0 comments on commit 791af36

Please sign in to comment.