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
ops sorry I found that managing the first page is impossible because 0 will be regarded as allocation failure. Sorry
Thinking about it, there's no reason not to be able to do this. The allocation logic itself is handled by the tree component and the allocator just maps tree positions to addresses and vice-versa. It is doable to redo the allocator component with a different API (e.g. struct alloc_result { void * addr; size_t result }) and still use the zero page.
buddy_alloc/buddy_alloc.h
Line 443 in 0b679cd
buddy_alloc/buddy_alloc.h
Line 489 in 0b679cd
For example, I am writing an OS and manage the whole linear memory with this allocator.
However, this check is also useful to general usages.
Thanks. This is a pretty-good library.
The text was updated successfully, but these errors were encountered: