Closed mrdeep1 closed 10 months ago
Hello @mrdeep1 I have done some memory analysis on this PR.
Example | Version | Size (libcoap.a) | Peak Heap Usage |
---|---|---|---|
coap_client | after update | 51377 | 30488 |
coap_client | before update | 50519 | 29820 |
coap_server | after update | 60278 | Peak heap usage increases after every request |
coap_server | before update | 60036 | Peak heap usage increases after every request |
I suspect coap_server is leaking memory on every request from a client. Can you please check?
I suspect coap_server is leaking memory on every request from a client. Can you please check?
I have pushed a change to the coap server to include coap_context_set_max_idle_sessions(ctx, 20); which limits the number of idle server sessions to 20.
So now, for the first 20 requests from different (source_ip, source port} requests I would expect to see heap usage increasing, but not after that.
Checklist
url
field definedChange description
Add in configurable OSCORE support. Support building when only IPv4 is available. Update to latest libcoap code (4.3.4).