Convert num_alloc to a size_t in stack.c and tweak style