Memory usage is related to the sieve size (-s), and by the amount of cores your CPU has, or threads you use. Default sieve size is -s 500000000. If you find it is using too much memory, or freezes or crashes upon running the program, just decrease the sieve amount to a lower size. If you have more memory you might want to increase it, it may help performance. For reference i'm using -s 675000000 for the 8 core i7, which uses about 6.5 GB of RAM. On other systems with 4 core i5's i can use -s 900000000 which uses about 6 GB.
https://www.cs.cmu.edu/~dga/crypto/ric/readme.html