revert back to malloc for global-var.c