From 8a3fc25ab19feab09514a3a69c58e5a0a8eac460 Mon Sep 17 00:00:00 2001 From: TuDatTr Date: Sun, 24 Jan 2021 22:58:46 +0100 Subject: [PATCH] Bugfix --- mm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mm.c b/mm.c index e881491..a1a2ffa 100644 --- a/mm.c +++ b/mm.c @@ -171,11 +171,10 @@ static inline int getSzClass(size_t asize); //////////////////////////////////////////////////////////////////////////////// static inline int getSzClass(size_t asize) { int i; - int size = asize; for (i = 0; i < LISTSIZE-1; ++i) { - if (size > 1) + if (asize <= 1) break; - size >>= 1; + asize >>= 1; } return i; }