Skip to content
This repository was archived by the owner on Jul 27, 2022. It is now read-only.

tweak double hammer test case #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions double_sided_rowhammer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ uint64_t HammerAddressesStandard(
uint64_t number_of_reads) {
uint64_t* first_pointer = reinterpret_cast<uint64_t*>(first_range.first);
uint64_t* second_pointer = reinterpret_cast<uint64_t*>(second_range.first);
volatile uint64_t sum = 0;
uint64_t sum = 0;

while (number_of_reads-- > 0) {
sum += first_pointer[0];
Expand Down Expand Up @@ -272,7 +272,7 @@ uint64_t HammerAllReachablePages(uint64_t presumed_row_size,
memset(target_page, 0xFF, 0x1000);
}
// Test sleep code to see how this affects the distribution.
sleep(1);
//sleep(1);
// Now hammer the two pages we care about.
std::pair<uint64_t, uint64_t> first_page_range(
reinterpret_cast<uint64_t>(first_row_page),
Expand Down
1 change: 1 addition & 0 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
set -eu

g++ -g -Wall -Werror -O2 rowhammer_test.cc -o rowhammer_test
g++ -g --std=c++11 -Wall -O2 double_sided_rowhammer.cc -o double_sided_rowhammer