We really need to get rid of any GC allocations in this module, but that can remain a TODO.