diff options
author | Daniel Moody <daniel.moody@mongodb.com> | 2022-02-18 14:24:37 -0600 |
---|---|---|
committer | Dave Watson <dade.watson@gmail.com> | 2022-03-10 15:33:16 -0800 |
commit | e85b65cec757ef589f28957d0c6c21c498a03bdf (patch) | |
tree | 1c114d1467144a50768804d7cb102fcba59df9be /src/arm | |
parent | b06ef3d1afd12dc349e21869ed22b8da9821b5ad (diff) | |
download | libunwind-e85b65cec757ef589f28957d0c6c21c498a03bdf.tar.gz |
Updated to determine PAGE_SIZE dynamically.
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/Ginit.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/arm/Ginit.c b/src/arm/Ginit.c index 0bac0d72..bce52dc3 100644 --- a/src/arm/Ginit.c +++ b/src/arm/Ginit.c @@ -71,9 +71,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]; @@ -83,14 +80,8 @@ static int validate_mem (unw_word_t addr) { int i, victim; - 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; |