You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also this code might return badly aligned address because kcallloc may choose one of free blocks in a list of kblocklist instead of allocating the new properly aligned one by kalign_heap function
To test it, you can put before the code
void* ptr = kcalloc(PMM_FRAME_SIZE, 1); // make sure ptr is not properly aligned
kfree(ptr);
... kalign code ...
// struct pdirectory *va_dir will be equal to ptr which is not properly aligned
Hello, thanks for the project, it very helps me to learn os development
I've found a little but quite severe bug in kalign_heap function
mos/src/kernel/memory/malloc.c
Line 156 in 8327ee4
I think it should be
while (last->next)
The text was updated successfully, but these errors were encountered: