aboutsummaryrefslogtreecommitdiffstats
path: root/mm/nommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/nommu.c')
-rw-r--r--mm/nommu.c49
1 files changed, 48 insertions, 1 deletions
diff --git a/mm/nommu.c b/mm/nommu.c
index 88ff091eb07a..30b5c20eec15 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -293,11 +293,58 @@ void *vmalloc(unsigned long size)
293} 293}
294EXPORT_SYMBOL(vmalloc); 294EXPORT_SYMBOL(vmalloc);
295 295
296/*
297 * vzalloc - allocate virtually continguos memory with zero fill
298 *
299 * @size: allocation size
300 *
301 * Allocate enough pages to cover @size from the page level
302 * allocator and map them into continguos kernel virtual space.
303 * The memory allocated is set to zero.
304 *
305 * For tight control over page level allocator and protection flags
306 * use __vmalloc() instead.
307 */
308void *vzalloc(unsigned long size)
309{
310 return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO,
311 PAGE_KERNEL);
312}
313EXPORT_SYMBOL(vzalloc);
314
315/**
316 * vmalloc_node - allocate memory on a specific node
317 * @size: allocation size
318 * @node: numa node
319 *
320 * Allocate enough pages to cover @size from the page level
321 * allocator and map them into contiguous kernel virtual space.
322 *
323 * For tight control over page level allocator and protection flags
324 * use __vmalloc() instead.
325 */
296void *vmalloc_node(unsigned long size, int node) 326void *vmalloc_node(unsigned long size, int node)
297{ 327{
298 return vmalloc(size); 328 return vmalloc(size);
299} 329}
300EXPORT_SYMBOL(vmalloc_node); 330
331/**
332 * vzalloc_node - allocate memory on a specific node with zero fill
333 * @size: allocation size
334 * @node: numa node
335 *
336 * Allocate enough pages to cover @size from the page level
337 * allocator and map them into contiguous kernel virtual space.
338 * The memory allocated is set to zero.
339 *
340 * For tight control over page level allocator and protection flags
341 * use __vmalloc() instead.
342 */
343void *vzalloc_node(unsigned long size, int node)
344{
345 return vzalloc(size);
346}
347EXPORT_SYMBOL(vzalloc_node);
301 348
302#ifndef PAGE_KERNEL_EXEC 349#ifndef PAGE_KERNEL_EXEC
303# define PAGE_KERNEL_EXEC PAGE_KERNEL 350# define PAGE_KERNEL_EXEC PAGE_KERNEL