Fixed upper and lower bounds in region_alloc, TODO handle out of memory errors and free allocated pages