master
TuDatTr 2021-01-24 22:58:46 +01:00
parent a801e2638a
commit 8a3fc25ab1
1 changed files with 2 additions and 3 deletions

5
mm.c
View File

@ -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;
}