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
I will be using the page map for info and O(1) deallocation of a single page (instant check).
A stack will be used for storing free and caching page indices. This allows O(1) allocation of a single page.
Reserved pages should stay forever reserved, so there is no point in storing them in a stack.
Used pages don't need specific storage. When used pages need to be used (e.g. reallocation to make room for consecutive pages), the map needs to be looped over anyway.
I do not believe I will need to allocate consecutive physical pages often, and I really do not like the implications of every algorithm that would allow quicker multi-page allocation.
The same "stack" will contain both free and caching pages, but the stack will have two "tops". The caching pages sit above the free ones.
E.g. when a free page is popped, the free top decrements, the top caching page is written in its place and the caching top decrements. Performance should be satisfactory.
The text was updated successfully, but these errors were encountered:
- Added ability to write very simple formatteed output to terminals;
- Added debug functions: Assert and CatchFire;
- Added a decent assert macro;
- Fixed a few mistakes in the page allocator...
... working towards #1 and #8.
Hopefully the final nail in the coffin of todo #1. The current solution (instancing one allocation space per available map entry) is a bit crude. Improvements may be made in the future (#12). For now, it suffices.
I will be using the page map for info and O(1) deallocation of a single page (instant check).
A stack will be used for storing free and caching page indices. This allows O(1) allocation of a single page.
Reserved pages should stay forever reserved, so there is no point in storing them in a stack.
Used pages don't need specific storage. When used pages need to be used (e.g. reallocation to make room for consecutive pages), the map needs to be looped over anyway.
I do not believe I will need to allocate consecutive physical pages often, and I really do not like the implications of every algorithm that would allow quicker multi-page allocation.
The same "stack" will contain both free and caching pages, but the stack will have two "tops". The caching pages sit above the free ones.
E.g. when a free page is popped, the free top decrements, the top caching page is written in its place and the caching top decrements. Performance should be satisfactory.
The text was updated successfully, but these errors were encountered: