[RFC] Remove `alloc_check`

`alloc_check` is just a wrapper around `xmalloc`, so we can remove it and use `xmalloc` directly. ref #487