Fixed realloc bug & use pagesizes for allocation chunk