Hi, list, I was wondering about the memory functions, getbytes and freebytes. Namely, are they essential? Why not use calloc and free?
(I've used calloc in an external before with no apparent negative consequences) I ask, because I've got a subroutine in Fortran that I've been trying to link into an external. The fortran subroutine of course has its own allocation method. Not sure what the error is yet. It seems to be different every time. One instance: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1208219968 (LWP 10256)] 0x001ff06c in _int_malloc () from /lib/libc.so.6 (gdb) bt #0 0x001ff06c in _int_malloc () from /lib/libc.so.6 #1 0x002001d9 in calloc () from /lib/libc.so.6 #2 0x00c801ad in controlfreak_tilde_perform () from /usr/local/lib/pd/extra/controlfreak~/controlfreak~.pd_linux #3 0x08f278fc in ?? () #4 0xbf9d2000 in ?? () #5 0xbf9d1f28 in ?? () #6 0xfffff810 in ?? () #7 0x00000000 in ?? ()
shows the problem has "something" to do with calloc. I don't know how much more general I can be. :)
Chuck
On Tue, 14 Mar 2006, Charles Henry wrote:
(I've used calloc in an external before with no apparent negative consequences) I ask, because I've got a subroutine in Fortran that I've been trying to link into an external. The fortran subroutine of course has its own allocation method. Not sure what the error is yet. It seems to be different every time.
For that kind of problem, please install and run a program called "valgrind".
"gdb" doesn't find that kind of problem.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada