Q:

Android java build drained 8GB of memory

I build Android-4.0.4 for odroid-x on a lenovo x220 core i7 8GB of RAM running Linux Mint 12 (Ubuntu-11.10). I start 5 jobs to build, and after a while OOM triggers and kills dozen of processes until it kills the java processes started by my build, and feels happy with it. By happy, I mean Linux does not trigger OOM afterward. I have uploaded my dmesg after the process slaughter finished. First OOM kills my chrome tabs, but they are innocent since OOM still triggers after they've all been killed.
But even after they have all been killed, OOM still triggers and looks for someone else to sacrifice. It gets to the java processes started by my make command. It killed them one by one:
CODE:
$ grep -i "kill process" dmesg.txt 
[181532.565512] Out of memory: Kill process 9161 (chromium-browse) score 305 or sacrifice child
[...]
[181560.198935] Out of memory: Kill process 7128 (chromium-browse) score 300 or sacrifice child
[181560.398301] Out of memory: Kill process 6823 (java) score 118 or sacrifice child
[181560.412076] Out of memory: Kill process 6855 (java) score 119 or sacrifice child
[181560.425394] Out of memory: Kill process 6859 (java) score 119 or sacrifice child

I described my issue on odroidx forum, but I fear it to be an environment issue. That's why I push a question in here. I have been building android from source with this computer for 6 months and never experienced such memory issues. In case it is useful, I use sun-java6:
$ dpkg --get-selections | grep java
java-common               
libhsqldb-java               
libjaxp1.3-java               
libreoffice-java-common            
libservlet2.5-java            
libxerces2-java               
plasma-scriptengine-javascript         
sun-java6-bin               
sun-java6-jdk               
sun-java6-jre               
sun-java6-plugin

$ uname -a
Linux xxx-ThinkPad-X220 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Has anyone experienced the same building android from source?
What could be leaking in the java build?

A:

It's not abnormal. I had this discussion before with someone building custom Android distros. You will need a lot more memory than 8 GB. IIRC they used a 32 GB ram machine.

