lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Destruction of socksem and selectsem in sockets.c


From: clive
Subject: [lwip-users] Destruction of socksem and selectsem in sockets.c
Date: Wed, 06 Sep 2006 08:20:37 +0100
User-agent: Demon-WebMail/2.0

Dear All,

In sockets.c, there are two semaphores that are created on first invocation, 
that are never destroyed - these are socksem and selectsem, created in 
alloc_socket() and event_callback() respectively. If I want to completely free 
all heap memory taken by the stack, these sems need to be destroyed as 
semaphore creation allocates memory on my OS.

The question is, where is it safe for them to be destroyed? My hunch is that it 
would be OK at the end of lwip_close(), immediately before the return statement.

Does anyone have any views on this?

Many thanks in anticipation,

Kind regards,

Clive Wilson






reply via email to

[Prev in Thread] Current Thread [Next in Thread]