There is really no way to do this without a complete redesign of isc_mem.