Re: [CM] s7 git, and a cleanup patch

2020-05-06 Thread bil

Thanks for the suggestion.  I was planning to do something
similar eventually, so I'll keep this patch at hand until
I'm ready to tackle it.  I think I'd allocate your
permanent_alloc_blocks array in blocks so to speak so
you don't have to call realloc all the time.

To track down memory leaks, valgrind's suppression file
can be used to leave all the s7 allocations out of the
report.  This may be specific to Linux.

___
Cmdist mailing list
Cmdist@ccrma.stanford.edu
https://cm-mail.stanford.edu/mailman/listinfo/cmdist



[CM] s7 git, and a cleanup patch

2020-05-06 Thread Woody Douglass
All,

Two things:

1) I'm planning on automating updates to my s7 github mirror, so stay tuned. 
I'm working on a script to be run nightly that pushes changes from svn to git. 
This will destroy the previous history, which kind of stinks, but it has the 
benefit of staying much more up to date

2) see the attached patch: it was helpful in finding a leak in my code, and may 
be helpful to others too. It adds a pair of cleanup functions to s7, and some 
tracking of "permanant" malloc'd buffers. Let me know what you guys think.

-Woody



0001-s7-cleanup.patch
Description: 0001-s7-cleanup.patch
___
Cmdist mailing list
Cmdist@ccrma.stanford.edu
https://cm-mail.stanford.edu/mailman/listinfo/cmdist


Re: [CM] Constant tables in s7

2020-05-06 Thread Kjetil Matheussen
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
 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@ccrma.stanford.edu
> https://cm-mail.stanford.edu/mailman/listinfo/cmdist

___
Cmdist mailing list
Cmdist@ccrma.stanford.edu
https://cm-mail.stanford.edu/mailman/listinfo/cmdist