PAGE_COUNT
if (PAGE_COUNT(image->segment[i].memsz) > nr_pages / 2)
total_pages += PAGE_COUNT(image->segment[i].memsz);