# Is there a way to check how "far away" a pointer is from a page boundary?

**URL:** <https://discourse.julialang.org/t/is-there-a-way-to-check-how-far-away-a-pointer-is-from-a-page-boundary/8147>\
**Category:** General Usage\
**Created:** [January 4, 2018, 4:34am UTC](https://discourse.julialang.org/t/is-there-a-way-to-check-how-far-away-a-pointer-is-from-a-page-boundary/8147 "2018-01-04T04:34:35Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [January 6, 2018, 3:31pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-check-how-far-away-a-pointer-is-from-a-page-boundary/8147/22 "2018-01-06T15:31:48Z")

</div>

> [@xiaodai](#):
>
> So the machine stores 15 bytes across two pages? But `unsafe_load.(Ptr{UInt128}.(ptrs))` on these pointers still work fine

Just because a read past the end of an array crosses a page boundary doesn’t mean that it _must_ crash, just that it _may_ crash. It depends on whether the next page is readable. The fact that reading a few bytes past the end of an array hardly ever crashes just makes the bug more insidious and harder to track down — that’s why tools like [efence](https://en.wikipedia.org/wiki/Electric_Fence) and `valgrind` are helpful.

[Previous page](https://discourse.julialang.org/t/is-there-a-way-to-check-how-far-away-a-pointer-is-from-a-page-boundary/8147.md?page=1)
