Hi,
When a socket is created, mmBulkAlloc() is called internally and the memory for sockets buffers (including TX and RX) from the standard heap.
I have a few questions about this procedure and the opposite, socket close and memory free.
1 - Which function calls mmBulkAlloc?
2 - How should I close the socket?
I've looked at NDK_INSTALL_DIR\packages\ti\ndk\tools\console\console.c
but I didn't quite understand it.
Should I use shutdown(stcp_child2, SHUT_RDWR) or fdClose( stcp_child2 )?
Which socket should be closed? Child, parent or both?
After closing the socket, what should be done next?
Create a new socket using socket() or just accept() a new connection?
3 - How the socket memory is freed. I'm trying to use fdclose() and socket shutdown(), but the socket memory is not freed when I try to use a new socket I get a mmBulkAlloc error of memory overflow.
I could increase the heap, but with a lot of reconnects we would have an overflow anyway.
Thanks