Lines Matching refs:memory

7 Linux provides a variety of APIs for memory allocation. You can
14 Most of the memory allocation APIs use GFP flags to express how that
15 memory should be allocated. The GFP acronym stands for "get free
16 pages", the underlying memory allocation function.
19 makes the question "How should I allocate memory?" not that easy to
32 The GFP flags control the allocators behavior. They tell what memory
34 memory, whether the memory can be accessed by the userspace etc. The
40 kernel data structures, DMAable memory, inode cache, all these and
43 direct reclaim may be triggered under memory pressure; the calling
47 IO or filesystem operations. Consequently, under memory pressure
50 * If you think that accessing memory reserves is justified and the kernel
60 ``GFP_HIGHUSER_MOVABLE`` does not require that allocated memory
64 ``GFP_HIGHUSER`` means that the allocated memory is not movable,
69 ``GFP_USER`` means that the allocated memory is not movable and it
74 prevent recursion deadlocks caused by direct memory reclaim calling
81 used to ensure that the allocated memory is accessible by hardware
94 attempt to free memory at all. The most light weight mode which even
96 might deplete the memory and the next user might hit the more aggressive
100 allocation without any attempt to free memory from the current
101 context but can wake kswapd to reclaim memory if the zone is below
108 some portion of memory reserves. Usually used from interrupt/bottom-half
131 Selecting memory allocator
134 The most straightforward way to allocate memory is to use a function
136 routines that set memory to zero, like kzalloc(). If you need to
137 allocate memory for an array, there are kmalloc_array() and kcalloc()
155 request pages from the page allocator. The memory allocated by `vmalloc`
160 try to allocate memory with `kmalloc` and if the allocation fails it
163 documentation. Note that `kvmalloc` may return memory that is not
171 wrappers can allocate memory from that cache.
173 When the allocated memory is no longer needed it must be freed.