3 ms·
Hard no. Because: $ git grep -P '(X[CM]ALLOC|XREALLOC|XSTRDUP)' | wc -l 1612 $ git grep -P XFREE | wc -l 2000 $ git grep -
by eqvinox 3y ago
Hard no. Because:
$ git grep -P '(X[CM]ALLOC|XREALLOC|XSTRDUP)' | wc -l
1612
$ git grep -P XFREE | wc -l
2000
$ git grep -P XREALLOC | wc -l
51
alloc and free are the most common operations, and having them be their own thing makes it much easier to reason about the code. Folding them into a common function makes the code much harder to review and maintain, both for humans as well as for tools (e.g. coccinelle).