[Asterisk-Dev] Memory allocation issues

Dustin Mulcahey dmulcahey at convergentvoice.com
Tue Jan 13 09:50:04 MST 2004


I'm developing a new channel driver for a device.  I'm calling
ast_channel_alloc from one of my functions, and as I step through the
execution of ast_channel_alloc with gdb, everything is being initialized
properly.  However, once ast_channel_alloc returns, the pvt field of the
data structure created is reset to null.  I've verified that the structure
created in the function and the pointer returned are the same memory
address.  Also, this doesn't seem to be an issue in any of the stock channel
drivers that come with the source distribution, and this problem did not
haunt me until I upgraded to 0.7.0.  I can't see any difference between the
way I'm calling ast_channel_alloc and the way the stock channel drivers are.
Any insights into this?

Dustin Mulcahey
Convergent Voice, Inc

More information about the asterisk-dev mailing list