Using a fake address here was on purpose, it would catch accesses to the underlying memory by causing a segfault.
Ah, that wasn't so clear to me from the code comment. Mission accomplished, I suppose. :) Since the access occurs when calling walk, those calls aren't very useful in this test given they cause a segfault.
Also it leaks a MB of memory now.
Won't the memory be deleted when the unique_ptr goes out of scope since I'm using get and not release?
That said, I see the fake address is used later in the test, so perhaps it would be better to leave it as it was and remove the calls to walk given the segfault. Not sure what value walk has if never called though. Thoughts?