diff options
author | Karolina Drobnik <karolinadrobnik@gmail.com> | 2022-02-02 12:03:09 +0100 |
---|---|---|
committer | Mike Rapoport <rppt@linux.ibm.com> | 2022-02-20 08:44:37 +0200 |
commit | 16802e55dea9534c18a30bd8eeefea8a06337916 (patch) | |
tree | 3baa119284c22435f524bf65c86e0ef00968dae0 /tools/include/linux | |
parent | 62183279ad2f52d36b40365eb3a27c7a4a2284f8 (diff) |
memblock tests: Add skeleton of the memblock simulator
Add basic project files, together with local stubs of required headers.
Update tools/include/slab.h to include definitions used by memblock.
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Signed-off-by: Mike Rapoport <rppt@kernel.org>
Link: https://lore.kernel.org/r/d296fceb023a04b316a31fbff9acf1e76ac684e4.1643796665.git.karolinadrobnik@gmail.com
Diffstat (limited to 'tools/include/linux')
-rw-r--r-- | tools/include/linux/slab.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/include/linux/slab.h b/tools/include/linux/slab.h index 07d7930d4003..f41d8a0eb1a4 100644 --- a/tools/include/linux/slab.h +++ b/tools/include/linux/slab.h @@ -13,6 +13,16 @@ void *kmalloc(size_t size, gfp_t gfp); void kfree(void *p); +bool slab_is_available(void); + +enum slab_state { + DOWN, + PARTIAL, + PARTIAL_NODE, + UP, + FULL +}; + static inline void *kzalloc(size_t size, gfp_t gfp) { return kmalloc(size, gfp | __GFP_ZERO); |