Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Create a memory bitmap and implement malloc #10

Open
xbhatnag opened this issue Feb 24, 2019 · 0 comments
Open

Create a memory bitmap and implement malloc #10

xbhatnag opened this issue Feb 24, 2019 · 0 comments

Comments

@xbhatnag
Copy link
Owner

Currently very few pages are mapped in the MMU to get the kernel working.
But the OS has no idea about the overall usage of physical memory.
There needs to be a memory bitmap. Get total number of pages in physical memory.
1 bit for each - used or not?

This leads the way to malloc working correctly. Kernel asks for memory? Ok. Find a free page. Mark it used. Zero out the bits. Return an address.

We aren't always pulling out new pages though. This gets complicated when we need to find free space within a used page. How does that work?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant