Hi,
I am trying to use realloc() to manipulate strings. I get the following PD error when I try to make a string about 64 chars long.
*** glibc detected *** realloc(): invalid next size: 0x0830df68 ***
Does it mean that PD only allows me to use that much memory, according to the size of my struct or a little more ? I hope not.
Thanks, aalex
On Tue, 7 Mar 2006, Alexandre Quessy wrote:
I am trying to use realloc() to manipulate strings. I get the following PD error when I try to make a string about 64 chars long. *** glibc detected *** realloc(): invalid next size: 0x0830df68 *** Does it mean that PD only allows me to use that much memory, according to the size of my struct or a little more ? I hope not.
No, it means that you confused your args and so you're passing a pointer as the size argument! I say that because 0x0830df68 looks like a heap address, that is, the result of a malloc().
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada
Mathieu Bouchard a écrit :
No, it means that you confused your args and so you're passing a pointer as the size argument! I say that because 0x0830df68 looks like a heap address, that is, the result of a malloc().
Almost. That was the space allocated that wasnt big enough.
Now, is there a C library I could use for turning lists into strings, arrays of strings into lists, etc. ? I m currently reinventing the wheel, I'm afraid. All kinds of functions making easier the interface with PD should be added to m_pd.h, or in an other similar header. For now, I just want pure C, but maybe C++ would be a better option ?
aalex