On older macOS, limits are not effective. On Debian 12: ulimit -d results in "916" which makes sense ulimit -m results in being killed for some other reason, after a longish time (this box has only 4G of RAM) so the plot thickens.