mainloop.c - malloc without a prototype