Quantcast
Channel: Embedded Software (Read Only)
Viewing all articles
Browse latest Browse all 25965

Forum Post: RE: Memory issues using NDK2

$
0
0

Max,

We confused ourselves I believe. You can't manually allocate the memory that accept uses. When you close the socket, that memory should be freed. I wanted you to make sure that you're freeing the memory you create in your application for  send and receive buffers. This isn't created by accept.

Also are you creating a task to handle each socket connection? If you are, make sure to delete the tasks when you're done to ensure that you're not leaking memory. If you have a task for each socket connection, make sure that you call fdOpenSession(TaskSelf()) at the beginning of your task and fdCloseSession(TaskSelf()) at the end.

Let me know if this helps

Moses


Viewing all articles
Browse latest Browse all 25965

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>