fix calcultating page-count in stack-allocator