Don't allocate memory for 0-page-sized requests
Previously the allocator would return all availble memory for a request of 0 pages. This is rather counter-intuitive and left no memory for subsequent allocations.
This commit is contained in:
@ -553,6 +553,9 @@ static void *mckernel_allocate_aligned_pages_node(int npages, int p2align,
|
||||
#endif
|
||||
int numa_id;
|
||||
|
||||
if(npages <= 0)
|
||||
return NULL;
|
||||
|
||||
/* Not yet initialized or idle process */
|
||||
if (!cpu_local_var_initialized ||
|
||||
!cpu_local_var(current) ||
|
||||
|
||||
Reference in New Issue
Block a user