[PATCH v2 6/8] sandbox: Avoid using malloc() for system state