Hello,
For a project, I am tasked with making a very, very small operating system simulation. The program would be given some amount of memory by the user, and then handle system calls, interrupts, allocate memory and simulate a ready queue. My question revolves around the very first part of this, which would be memory management. What container should I use to keep track of memory?
I was thinking of using two vectors - one to track unused and one to track used memory. When made, the first would be of the input size and the second empty, and I'd just pop/push - so that the first would shrink and the second grow, but wouldn't add up to more than the memory given.
We were told not to use arrays, since it would be inefficient, so I am just asking for input whether vectors would be better, or if I should look in a different direction.