From da190f1469277710321e37f1bc89abea001aa584 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 12 May 2021 21:01:13 -0400 Subject: [PATCH] mark pvalloc error path as unlikely --- h_malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h_malloc.c b/h_malloc.c index 0ff35d9..30813ce 100644 --- a/h_malloc.c +++ b/h_malloc.c @@ -1512,7 +1512,7 @@ EXPORT void *h_valloc(size_t size) { EXPORT void *h_pvalloc(size_t size) { size = PAGE_CEILING(size); - if (!size) { + if (unlikely(!size)) { errno = ENOMEM; return NULL; }