20 #include <linux/slab.h>
37 size_t kmsize = maxsize;
39 while (!(ptr = kmem_zalloc_large(kmsize))) {
40 if ((kmsize >>= 1) <= minsize)
52 gfp_t lflags = kmem_flags_convert(flags);
59 if (!(++retries % 100))
61 "possible memory allocation deadlock in %s (mode:0x%x)",
74 memset((
char *)ptr, 0, (
int)size);
81 if (!is_vmalloc_addr(ptr)) {
98 ((oldsize < newsize) ? oldsize : newsize));
108 gfp_t lflags = kmem_flags_convert(flags);
115 if (!(++retries % 100))
117 "possible memory allocation deadlock in %s (mode:0x%x)",