summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdde_linux26/lib/src/arch/l4/kmalloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libdde_linux26/lib/src/arch/l4/kmalloc.c b/libdde_linux26/lib/src/arch/l4/kmalloc.c
index 87d64878..0e94fb97 100644
--- a/libdde_linux26/lib/src/arch/l4/kmalloc.c
+++ b/libdde_linux26/lib/src/arch/l4/kmalloc.c
@@ -134,9 +134,12 @@ void *__kmalloc(size_t size, gfp_t flags)
if (cache)
/* allocate from cache */
p = kmem_cache_alloc(cache, flags);
- else
+ else {
/* no cache for this size - use ddekit malloc */
p = ddekit_large_malloc(size);
+ if (flags & __GFP_ZERO)
+ memset (p, 0, size);
+ }
ddekit_log(DEBUG_MALLOC, "size=%d, cache=%p (%d) => %p",
size, cache, cache ? kmem_cache_size(cache) : 0, p);