changed the number of pages to allocate

struct malloc_header is necessary at both ends of the new free space.
however, only one malloc_header is included in the req_pages.
This commit is contained in:
NAKAMURA Gou
2013-05-29 19:04:20 +09:00
parent 248ba5acb8
commit c8b7a853cc

View File

@@ -316,7 +316,7 @@ void *kmalloc(int size, enum ihk_mc_ap_flag flag)
while (1) {
if (h == &v->free_list) {
req_page = ((u + 1) * sizeof(*h) + PAGE_SIZE - 1)
req_page = ((u + 2) * sizeof(*h) + PAGE_SIZE - 1)
>> PAGE_SHIFT;
h = allocate_pages(req_page, flag);