From 8b9fe196a105f1d71baaac8eed4e79ee9a2c38d1 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 21 May 2025 14:01:42 +0200 Subject: [PATCH] No need to clear allocation table during allocation The mmc clears holes eagerly; there is no need to memset during allocation. --- api/gc-api.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/gc-api.h b/api/gc-api.h index 2ab063f8d..6d4f9cbe1 100644 --- a/api/gc-api.h +++ b/api/gc-api.h @@ -88,8 +88,6 @@ static inline void gc_update_alloc_table(struct gc_ref obj, size_t size, alloc[0] = begin_pattern | end_pattern; } else { alloc[0] = begin_pattern; - if (granules > 2) - memset(alloc + 1, 0, granules - 2); alloc[granules - 1] = end_pattern; } } else {