Split out of #37344.
This will allow us to remove the memory-util.h include from static-destruct.h as part of #37344.