Build throws segfault; Cannot allocate memory

The ubuntu Android environment seems to not be able to allocate memory. When running CMake, it throws the following errors:

    Segmentation fault
    /bin/sh: 1: /bin/sh: 1: /home/travis/build/OsomiLunar/ocore/cmake/bin/cmake: Cannot allocate memory
    /home/travis/build/OsomiLunar/ocore/cmake/bin/cmake: Cannot allocate memory
    /bin/sh: 1: /home/travis/build/OsomiLunar/ocore/cmake/bin/cmake: Cannot allocate memory
    /home/travis/build/OsomiLunar/ocore/cmake/bin/cmake: error while loading shared libraries: libc.so.6: cannot map zero-fill pages: Cannot allocate memory
    /bin/sh: 1: Cannot fork
    clang++: error: unable to execute command: Segmentation fault
    clang++: error: unable to execute command: Killed

At first I thought this was a problem with the API, but it builds fine on my Windows device and Linux VM. What can I do to fix this?
My build is located here and the errors start around line 1575.

Fixed; disabling parallel build (-j in make) solved it; it ran out of RAM.

Use make -j<number of cpus>. (All Travis builders are 2-core as of this writing but detection isn’t too hard to write.)

Running more jobs than that in parallel won’t have a noticeable effect on build speed anyway as tests show – while pulling ever more system resources as you could see.

Thanks, that should speed it up a bit :ok_hand: