check some malloc returns with Ashwin patch, add error messages and * threads.c: check some malloc returns with Ashwin patch, add error messages and reindent the module. Daniel svn path=/trunk/; revision=3709