def libc_free(mem)
      # TODO: free_hook
      mem = ulong mem
      return if mem.zero? # free(0) has no effect

      ptr = mem2chunk(mem)
      return munmap_chunk(ptr) if chunk_is_mmapped(ptr)

      av = arena_for_chunk(ptr)
      int_free(av, ptr)
    end
def libc_free(mem)
      # TODO: free_hook
      mem = ulong mem
      return if mem.zero? # free(0) has no effect

      ptr = mem2chunk(mem)
      return munmap_chunk(ptr) if chunk_is_mmapped(ptr)

      av = arena_for_chunk(ptr)
      int_free(av, ptr)
    end
Implmentation of +void __libc_free(void *mem)+.

 Reference:
 {https://github.com/david942j/heapinfo/blob/master/examples/libcdb/libc-2.23/malloc.c#L2934 glibc-2.23}
 and {https://code.woboq.org/userspace/glibc/malloc/malloc.c.html#__libc_free Online Source}
 @param [Integer] mem Memory address to be free.