On Sat, 10 Sep 2011, Jonathan Wilkes wrote:
Is there a limit on the size of a symbol?
The only thing that has traditionally limited the size of symbols used in practice, is the fact that they stay in RAM forever (for the lifetime of the process). Otherwise, people would have used them a lot more often and in big sizes, without much restraint.
Well, for a bunch of string operations, Pd has a limit of MAXPDSTRING, which is set to 1000 in <m_pd.h>. But inside of m_class.c, you can see that gensym (and dogensym) do not use that constant, no other size limit other than HASHSIZE.
So, as long as you don't use MAXPDSTRING-dependent operations, and as long as you don't expect to embed a null byte, a symbol can be many megabytes.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC