On Thu, Sep 4, 2014 at 12:32 PM, swati joshi <[email protected]> wrote:

> You are right, I don't see any $Date in mongoose.c
> And the data (char*) that is sent to mg_wakeup_server( ) is not static.
> Its a either a global / local value. And in this case i see leaks.
>

Okay, thanks.

The way mg_wakeup_server() works is this:
   o  when server is initialized, server creates a socketpair
   o  mg_wakeup_server() sends a message to the one side of the socketpair.
thus, a message is copied into the kernel's socket buffer, so it is
irrelevant whether the buffer was local or global. if the buffer was
allocated by the user, it should be free-d by the user
   o  mg_poll_server() checks the other side of the socketpair, and if
there is a message, it reads it into the local buffer and iterates over all
connections, passing that message to each

It is hard to see where a leak could possibly be, no allocation is
happening on mongoose side.
A socket pair is created once at startup.

Maybe websocket code has a leak, looking into that.

-- 
You received this message because you are subscribed to the Google Groups 
"mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to