Final version?

master
TuDatTr 2021-01-24 22:57:04 +01:00
parent ad1dd76932
commit a801e2638a
1 changed files with 5 additions and 2 deletions

7
mm.c
View File

@ -171,8 +171,11 @@ static inline int getSzClass(size_t asize);
////////////////////////////////////////////////////////////////////////////////
static inline int getSzClass(size_t asize) {
int i;
for (i = 0; (i < LISTSIZE-1) && (asize > 1); ++i) {
asize >>= 1;
int size = asize;
for (i = 0; i < LISTSIZE-1; ++i) {
if (size > 1)
break;
size >>= 1;
}
return i;
}