Event engine memory cache for nxt_sockaddr_t.

Introducing event engine memory cache and using the cache for
nxt_sockaddr_t structures.
This commit is contained in:
Igor Sysoev
2017-09-27 19:22:59 +03:00
parent 752038eea8
commit bfa808d689
8 changed files with 185 additions and 20 deletions

View File

@@ -69,6 +69,10 @@ typedef struct {
} nxt_job_sockaddr_parse_t;
nxt_sockaddr_t *nxt_sockaddr_cache_alloc(nxt_event_engine_t *engine,
nxt_listen_event_t *lev);
void nxt_sockaddr_cache_free(nxt_event_engine_t *engine, nxt_conn_t *c);
NXT_EXPORT nxt_sockaddr_t *nxt_sockaddr_alloc(nxt_mp_t *mp, socklen_t socklen,
size_t address_length)
NXT_MALLOC_LIKE;