[PD-dev] Memory reallocation problem

Isidro Gonzalez isidro_gonsoy at yahoo.com
Tue Oct 13 19:43:07 CEST 2009


Hi:
I am triying to allocate a n*n matrix of a type defined structure of data.
The pd external object example I'm sending attached is very simple: each time it receives any message except the "clear" message it increments a counter and reallocate a matrix of n*n members where n is the number stored in the counter (so, 1, 4, 9, 16 and so on). If it receives the "clear" message, it reset the counter to 1 and reallocate the matrix to 1x1.
The fact is that the object crashed when reallocating and I can't be able to know what am I doing wrong. I use the traditional "realloc" function.
Any help will be welcome.
Best 
Isi


      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dummy.c
Type: application/octet-stream
Size: 1710 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20091013/88275f6c/attachment.obj>


More information about the Pd-dev mailing list