Hi,
They are independent things.
Orrexon wrote:If not could some body please point me in a another direction?

The purpose is to implement some allocation function similar to the "malloc" function.
That's a bit more complicated than that. You'll need several layers of allocation, see
here. I've also wrote about it
here.
If you're not thinking about a general purpose system, just a single application, even then you'll need
- a page allocator, that keeps track of RAM (often called PMM, physical memory manager)
- a virtual memory allocator, that keeps track which pages are mapped where (VMM, virtual memory manager)
- and a user space library (which could be a kernel library if you're not planning on user space) that allows allocating arbitrary amounts of memory, this is what we actually call malloc.
Note that the first two layers are
using pages (4096 bytes at once), so it is the library function's job to keep track smaller amounts, like 32 bytes allocations. With identity paging, you can get away the first two layers (but I would recommend to still implement PMM). There are many free and open source solutions for this last, dlmalloc, ptmalloc, etc., even I have written one, called bztalloc, but for a game I'd recommend
jemalloc. It might be a bit harder to get it working on bare metal than the others, but it will pay out on the long run, when your game engine becomes advanced enough to feel the need for concurrent threads (one for playing the music, one for calculating the physics, one for handling user input etc.) Jemalloc is designed to be very effective in a multithreaded environment, and it was specifically created for the need of a game engine in C++.
Orrexon wrote:Or perhaps in my case I don't need the MMU? (I suppose I'd like to have the MMU activated to support different processes running on the Pi in the future)
You definitely need MMU, even for a monotasking system, just like @fbkr said. Without MMU, you won't have caching, memory is going to be slow, and you'll have to stick with strictly aligned accesses. With MMU, you can set up different caching mechanisms, and you can access any byte in the memory without getting an alignment fault. Furthermore, if you're planning to have multiple processes, then you'll need (it is not required, but strongly encouraged to have) separated address spaces for each process, and again, for that you'll need MMU.
Orrexon wrote:I am playing around with Rpi 4 and I am aware there might have been changes regarding this from the Rpi 3 to which this particular tutorial is written..
Nope, the basic concept of virtual memory is the same (and it is the same for all architectures). See
here. Of course the bits are not like that on ARM, but everything else is the same. Take a look at the AArch64 paging figure in
this post, if you scroll a bit up, you can compare it with the x86 long mode paging, and you can see the basics are the same.
Orrexon wrote:Very greatful for any help, I have been programming for some time and I have recently found out that bare metal programming is the most rewarding form of programming.

And the most challenging one too
Cheers,
bzt