If anything I’ve actually seen people using the OS’s virtual memory as a garbage collector in C and C++. Not really portable everywhere, but close enough for most people. For short-lived executables that can’t really allocate unlimited memory, it’s perfectly fine.