refs #127 Use a scoped malloc during serialize
Use scoped_malloc over alloca()