summaryrefslogtreecommitdiff
path: root/include/linux/slab.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/slab.h')
-rw-r--r--include/linux/slab.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h
index ca0c7934..35f7b1ba 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -20,6 +20,11 @@
#define ARCH_KMALLOC_MINALIGN 16
#define KMALLOC_MAX_SIZE SIZE_MAX
+static inline size_t kmalloc_size_roundup(size_t s)
+{
+ return roundup_pow_of_two(s);
+}
+
static inline void *kmalloc_noprof(size_t size, gfp_t flags)
{
unsigned i;