This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestMemoryAccessPatterns { | |
private static final int LONG_SIZE = 8; | |
private static final int PAGE_SIZE = 2 * 1024 * 1024; | |
private static final int ONE_GIG = 1024 * 1024 * 1024; | |
private static final int ARRAY_SIZE = (int) (ONE_GIG / LONG_SIZE); | |
private static final int WORDS_PER_PAGE = PAGE_SIZE / LONG_SIZE; | |
private static final int ARRAY_MASK = ARRAY_SIZE - 1; | |
private static final int PAGE_MASK = WORDS_PER_PAGE - 1; |