William Bader wrote: > >> The smallest number that passed for me was 108336 > >> "(ulimit -v $(($vm+108336)) && fold 2>err >/dev/full)" > >Over 100MiB ? > >I wonder why the other ulimits in other tests OK? > > Could the 100MB be loading the CentOS 7 locale data? > -rw-r--r-- 1 root root 106176928 Jul 18 2022 /usr/lib/locale/locale-archive
Good point, yes. The locale-archive is mapped into memory (see glibc/locale/loadarchive.c); therefore it counts for the virtual memory size of the process (ulimit -v). > Maybe calling the library functions that fold needs > to avoid breaking multibyte characters > have a side-effect of loading the locale data. Yes. Where "loading" means not copying everything into RAM, but only the few pages from the locale(s) that are actually referenced. Bruno
