jack: Check memory allocation