From 57b91a8cfc300f247e828652a5e349dbd395d601 Mon Sep 17 00:00:00 2001 From: zhuyanlin Date: Mon, 27 Aug 2018 05:55:09 -0600 Subject: [PATCH] include/nuttx/kmalloc.h: Add {kumm/kmm}_calloc API. Add calloc API for manage user memory and kernel memory in Flat Build/Kernel Build without kernel heap. --- include/nuttx/kmalloc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/nuttx/kmalloc.h b/include/nuttx/kmalloc.h index 31cdecbcb7..3df4b7685e 100644 --- a/include/nuttx/kmalloc.h +++ b/include/nuttx/kmalloc.h @@ -90,6 +90,7 @@ extern "C" #define kumm_trysemaphore() umm_trysemaphore() #define kumm_givesemaphore() umm_givesemaphore() +#define kumm_calloc(n,s) calloc(n,s); #define kumm_malloc(s) malloc(s) #define kumm_zalloc(s) zalloc(s) #define kumm_realloc(p,s) realloc(p,s) @@ -113,6 +114,7 @@ extern "C" # define kmm_trysemaphore() umm_trysemaphore() # define kmm_givesemaphore() umm_givesemaphore() +# define kmm_calloc(n,s) calloc(n,s); # define kmm_malloc(s) malloc(s) # define kmm_zalloc(s) zalloc(s) # define kmm_realloc(p,s) realloc(p,s) @@ -135,6 +137,7 @@ extern "C" # define kmm_trysemaphore() umm_trysemaphore() # define kmm_givesemaphore() umm_givesemaphore() +# define kmm_calloc(n,s) calloc(n,s); # define kmm_malloc(s) malloc(s) # define kmm_zalloc(s) zalloc(s) # define kmm_realloc(p,s) realloc(p,s)