move stack allocator into its own files