Am trying to build AOSP code. Following the instruction am able to start the build but after few minutes my system hangs .System has 3GB RAM and 320GB hdd.
I have a 3GB RAM ubuntu system and AOSP source compiles without problems. Try using
make -j4
This will spawn 4 threads and will compile faster on a multi-core CPU.