You can use the Windows built in Resource Monitor program and then click on the memory tab.
In my case, my commit memory for the Microsoft flight simulator entry was steadily climbing while I flew.
Eventually it got to about 60 Gigabytes (I have 64) and I would get a crash with the invalid call error message.
It ended up being an external program I was running was somehow conflicting with MS 2024.
The commit memory stays pretty constant now.