More careful matching of alloc/free functions