Where to free memory in libuv-http_parser example

187 views
Skip to first unread message

bodo....@enabre.com

unread,
May 20, 2013, 2:39:16 AM5/20/13
to li...@googlegroups.com
Hello,

I have built an example which uses joyent/libuv and joyent/http-parser to parse a incoming http request and copy its information on a request struct.

See:
https://github.com/bodokaiser/libuv-webserver/blob/master/src/webserver.h

I now ran Apache Bench with 10000 requests and it did not crash but I noticed its memory just grows more and more.
I tried to free the memory of my http_request struct in the tcp_write_cb where I close the connection but then I always get following:

Assertion failed: (!uv__is_active(handle)), function uv__finish_close, file src/unix/core.c, line 165.
Abort trap: 6

So where or how do I properly free memory?

Bodo
Reply all
Reply to author
Forward
0 new messages