Maybe use a statically allocated buffer instead? IIRC @bnoordhuis once told me to do that in tests.