[CM] Constant tables in s7

Kjetil Matheussen k.s.matheussen at gmail.com
Wed May 6 07:47:57 PDT 2020


I think this was a patch from me. The reason is to shorten the time it
takes to scan memory for pointers if the program runs BDW-GC or a
similar garbage collector.


On Wed, May 6, 2020 at 4:24 PM Woody Douglass
<wdouglass at carnegierobotics.com> wrote:
>
> 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.
>
> Thanks,
> Woody Douglass
>
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> https://cm-mail.stanford.edu/mailman/listinfo/cmdist



More information about the Cmdist mailing list