citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 044510c11d5f4b39184ea8e9ef382e9607584931
parent f944701aa5357b5d3862996e06e4cdc992e35856
Author: kyle <kyle@0x30.net>
Date:   Sat, 19 Nov 2016 18:39:10 -0700

t: sync page skip logic with rt.c

Diffstat:
Mt/shm.pm | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/t/shm.pm b/t/shm.pm @@ -42,11 +42,15 @@ sub new { return $self; } +# Skips to the next page boundary. If exactly on a page boundary then stay +# there. sub next_page { my ($self) = @_; + my $page_mask = $pagesize - 1; my $cur_pos = tell $self->{fh}; - xread($self->{fh}, $pagesize - ($cur_pos % $pagesize)); + + seek $self->{fh}, ($cur_pos + $page_mask) & ~$page_mask, 0; } sub execs_for {