A good language just gives you the necessary tooling to do whatever you want, it doesn't magically fix problems.
Only languages like C++ have a memory model that allows you to do lock-free programming for example (C and Rust copied the C++ model).
Also, what kind of serious person allocates memory from the system allocator in a real-time loop? Your problems seem self-inflicted. Regardless there are many allocators that optimize for concurrent allocations: tcmalloc, jemalloc, mimalloc...
Only languages like C++ have a memory model that allows you to do lock-free programming for example (C and Rust copied the C++ model).
Also, what kind of serious person allocates memory from the system allocator in a real-time loop? Your problems seem self-inflicted. Regardless there are many allocators that optimize for concurrent allocations: tcmalloc, jemalloc, mimalloc...