1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/types.h>
3 #include <linux/init.h>
4 #include <linux/slab.h>
5 #include <linux/bootmem.h>
6 #include <linux/string.h>
10 void * __ref
zalloc_maybe_bootmem(size_t size
, gfp_t mask
)
14 if (slab_is_available())
15 p
= kzalloc(size
, mask
);
17 p
= memblock_virt_alloc(size
, 0);