mame -j2 works fine. I tested this yesterday on Ubuntu. Just can't use the -j3.

My guess is that the 6GB of memory isn't good enough. Need 8GB on the laptop so it can keep going without the terminal crashes.

Windows 10 Home 64-bit / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 16 GB