FMemory::Malloc() and FMemory::SystemMalloc() are returning nullptrs and aren't allocating memory

I seem to remember using FMemory::Malloc and having it work but I’ve tried using it in several projects of different unreal versions (4.23-4.26) and in none does it work. Is there something I’m missing?