I notice my available memory going down to zero (from 12GB) when compiling a project including a header-only library (tiny-dnn). Following this is a system freeze. This seems to mostly occur when there is a compilation or a linker error (especially linker error). This occurs with swap on or off.
Are there techniques to use memory more efficiently or maybe use less recursion or something.
I'm using gcc7+default linker of ubuntu14.04 (haven't checked, but will tomorrow) and CMake + Ninja build tools. Maybe there are some useful compile or link flags to use? Assume I'm using the bare minimum at this point. Maybe switching to clang compiler or gold linker will help?