Way back in the ASP3/IIS days, we had these "big" pages and because of the engine building big strings was slow. So, I made this little COM library (Linum) which would simply pre-allocate a buffer for writing into. Yes, a StringBuffer. For those scripts the runtime improved like 500%. Memory usage was only like 10% worse.
I have found that a general pattern of setting up a memory arena or anything of that kind does help, especially of course if one anticipates more frequent / heavier usage of heap. Helps with performance (e.g.: faster allocations), memory fragmentation (which itself also helps with performance indirectly of course) and other things. Can be very simple.[1]
Or more complicated (if anticipating a lot of allocation work for very varying buffer sizes) - e.g. slab allocators. memcached is an example where this is used, a couple pictures explain the gist.[2]
[1]: note: can be even simpler of course, but quick example of structs used:
[2]: https://siemens.blog/posts/memcached-memory-model/ - I'm sure that when heap is visualised, it would show how this helps keeping fragmentation at bay as well (this helps wasting fewer memory pages, too).