It doesn't compile with older gcc's - see the `extern' decl in the middle
of the function.
The compiler should have been given a way of disabling this. It'd going to
bite again and again.
I'll fix it up.
void *kmalloc(size_t size, int flags)
{
if (__builtin_constant_p(size)) {
int i = 0;
# 1 "include/linux/kmalloc_sizes.h" 1
if (size <= 32) goto found; else i++;
if (size <= 64) goto found; else i++;
if (size <= 128) goto found; else i++;
if (size <= 256) goto found; else i++;
if (size <= 512) goto found; else i++;
if (size <= 1024) goto found; else i++;
if (size <= 2048) goto found; else i++;
if (size <= 4096) goto found; else i++;
if (size <= 8192) goto found; else i++;
if (size <= 16384) goto found; else i++;
if (size <= 32768) goto found; else i++;
if (size <= 65536) goto found; else i++;
if (size <= 131072) goto found; else i++;
# 84 "include/linux/slab.h" 2
extern void __you_cannot_kmalloc_that_much(void);
__you_cannot_kmalloc_that_much();
found:
return kmem_cache_alloc((flags & 0x01) ?
malloc_sizes[i].cs_dmacachep :
malloc_sizes[i].cs_cachep, flags);
}
return __kmalloc(size, flags);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/