1
$\begingroup$

I am currently trying to build a simple computer in Minecraft (8-bit data, 6-bit addresses, no paging or segmentation), with redstone, where I can make run simple programs written similarly to code in the Little Man Computer. However, I have come across the problem that I have no idea which addresses in RAM are free to use.

I have seen Linux, for example, has an array that describes each address (that I am guessing includes if it is free or not). In my case, however, it seems impractical to create a massive block of memory dedicated to this, that will be a very similar size to even the RAM itself, due to having the same length for addresses.

Am I thinking about this the wrong way? Is there a more efficient method than creating a large block of storage? Is there a way to decrease the size of the storage?

$\endgroup$

1 Answer 1

0
$\begingroup$

The memory allocator is typically responsible for keeping track of which areas in memory are free. For instance, the memory allocator might keep a list of which regions of memory are free and available for allocation. This is called, appropriately, the "free list". See https://en.wikipedia.org/wiki/Free_list and https://en.wikipedia.org/wiki/Memory_management.

$\endgroup$
1
  • $\begingroup$ Thanks!!! this helped a lot. $\endgroup$ Commented Nov 21, 2023 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.