diff options
Diffstat (limited to 'src/x86/Ginit.c')
-rw-r--r-- | src/x86/Ginit.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/x86/Ginit.c b/src/x86/Ginit.c index 3cec74a2..4261fb52 100644 --- a/src/x86/Ginit.c +++ b/src/x86/Ginit.c @@ -74,9 +74,6 @@ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, return 0; } -#define PAGE_SIZE 4096 -#define PAGE_START(a) ((a) & ~(PAGE_SIZE-1)) - /* Cache of already validated addresses */ #define NLGA 4 static unw_word_t last_good_addr[NLGA]; @@ -89,14 +86,8 @@ validate_mem (unw_word_t addr) #ifdef HAVE_MINCORE unsigned char mvec[2]; /* Unaligned access may cross page boundary */ #endif - size_t len; - - if (PAGE_START(addr + sizeof (unw_word_t) - 1) == PAGE_START(addr)) - len = PAGE_SIZE; - else - len = PAGE_SIZE * 2; - - addr = PAGE_START(addr); + size_t len = unw_page_size; + addr = uwn_page_start(addr); if (addr == 0) return -1; |