On Wed, 1 Sep 2010, David Rientjes wrote:
Add kmalloc_nofail(), kcalloc_nofail(), and kzalloc_nofail(). These
functions are equivalent to kmalloc(), kcalloc(), and kzalloc(),
respectively, except that they will never return NULL and instead loop
forever trying to allocate memory.
If the
On 09/02/2010 03:02 AM, David Rientjes wrote:
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -334,6 +334,57 @@ static inline void *kzalloc_node(size_t size, gfp_t
flags, int node)
return kmalloc_node(size, flags | __GFP_ZERO, node);
}
+/**
+ * kmalloc_nofail -
On Thu 02-09-10 09:59:13, Jiri Slaby wrote:
On 09/02/2010 03:02 AM, David Rientjes wrote:
--- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -334,6 +334,57
@@ static inline void *kzalloc_node(size_t size, gfp_t flags, int node)
return kmalloc_node(size, flags | __GFP_ZERO, node); }
On Thu, 2 Sep 2010 16:51:41 +0200
Jan Kara j...@suse.cz wrote:
On Thu 02-09-10 09:59:13, Jiri Slaby wrote:
On 09/02/2010 03:02 AM, David Rientjes wrote:
--- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -334,6 +334,57
@@ static inline void *kzalloc_node(size_t size, gfp_t flags,
Add kmalloc_nofail(), kcalloc_nofail(), and kzalloc_nofail(). These
functions are equivalent to kmalloc(), kcalloc(), and kzalloc(),
respectively, except that they will never return NULL and instead loop
forever trying to allocate memory.
If the first allocation attempt fails because the page