[CM] Constant tables in s7

Woody Douglass wdouglass at carnegierobotics.com
Wed May 6 07:21:07 PDT 2020

A general question: is there a reason that constant tables, like exponent_table, slashify_table, char_ok_in_a_name, etc... are declared as static pointers, and then calloc'd? I'm trying to unit test some code that hooks s7, and my testing apparattus is reporting a bunch of leaks. So i've been looking at a generalized "free" for s7, and came across this.

Would it be better to declare them as static arrays? that way the calloc calls could be avoided and memory leak tools would be happier. I'd be happy to submit a patch if you guys (especially bil) think this is a good idea.

Woody Douglass

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/mailman/private/cmdist/attachments/20200506/6a73dd33/attachment.html>

More information about the Cmdist mailing list