tang.junhui wrote: > Memroy API use mem_allocated to record the total size of used memory, > however, it's wrong to use size(p) as the length of freed memory in xfree(), > and memory may also be allocated by STRDUP() or REALLOC(), which is > not calculated into mem_allocated, so the total size of used memory is > not correctly. For these reasons, we removed these incorrectly code to keep > the code clean. > libmpathpersist/mpath_updatepr.c | 1 - > libmultipath/memory.c | 31 ------------------------------- > libmultipath/memory.h | 13 ++----------- libmultipath/memory.[ch] files along with libmultipath/parser.[ch] and libmultipath/vector.[ch] come from keepalived/lib/ [1] . Maybe it's worth to backport their fixes and new features. [1] https://github.com/acassen/keepalived -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel