vmalloc.c (e644dae645e167d154c0526358940986682a72b0) | vmalloc.c (4d67d860531ad5378dedfad7661c540f3365013d) |
---|---|
1/* 2 * linux/mm/vmalloc.c 3 * 4 * Copyright (C) 1993 Linus Torvalds 5 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 6 * SMP-safe vmalloc/vfree/ioremap, Tigran Aivazian <tigran@veritas.com>, May 2000 7 * Major rework to support vmap/vunmap, Christoph Hellwig, SGI, August 2002 8 * Numa awareness, Christoph Lameter, SGI, June 2005 --- 2361 unchanged lines hidden (view full) --- 2370 } 2371 last_end = offsets[last_area] + sizes[last_area]; 2372 2373 if (vmalloc_end - vmalloc_start < last_end) { 2374 WARN_ON(true); 2375 return NULL; 2376 } 2377 | 1/* 2 * linux/mm/vmalloc.c 3 * 4 * Copyright (C) 1993 Linus Torvalds 5 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 6 * SMP-safe vmalloc/vfree/ioremap, Tigran Aivazian <tigran@veritas.com>, May 2000 7 * Major rework to support vmap/vunmap, Christoph Hellwig, SGI, August 2002 8 * Numa awareness, Christoph Lameter, SGI, June 2005 --- 2361 unchanged lines hidden (view full) --- 2370 } 2371 last_end = offsets[last_area] + sizes[last_area]; 2372 2373 if (vmalloc_end - vmalloc_start < last_end) { 2374 WARN_ON(true); 2375 return NULL; 2376 } 2377 |
2378 vms = kzalloc(sizeof(vms[0]) * nr_vms, GFP_KERNEL); 2379 vas = kzalloc(sizeof(vas[0]) * nr_vms, GFP_KERNEL); | 2378 vms = kcalloc(nr_vms, sizeof(vms[0]), GFP_KERNEL); 2379 vas = kcalloc(nr_vms, sizeof(vas[0]), GFP_KERNEL); |
2380 if (!vas || !vms) 2381 goto err_free2; 2382 2383 for (area = 0; area < nr_vms; area++) { 2384 vas[area] = kzalloc(sizeof(struct vmap_area), GFP_KERNEL); 2385 vms[area] = kzalloc(sizeof(struct vm_struct), GFP_KERNEL); 2386 if (!vas[area] || !vms[area]) 2387 goto err_free; --- 247 unchanged lines hidden --- | 2380 if (!vas || !vms) 2381 goto err_free2; 2382 2383 for (area = 0; area < nr_vms; area++) { 2384 vas[area] = kzalloc(sizeof(struct vmap_area), GFP_KERNEL); 2385 vms[area] = kzalloc(sizeof(struct vm_struct), GFP_KERNEL); 2386 if (!vas[area] || !vms[area]) 2387 goto err_free; --- 247 unchanged lines hidden --- |