Use reinterpret_cast
Factor out duplicated code
Define templatenized gc_checkpoint
Use spedial gc_checkpoint
more optimizations