summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_event_engine.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-09-27 19:22:59 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-09-27 19:22:59 +0300
commitbfa808d68997d74bfe0d54196bbbb649646787c1 (patch)
tree16751ca3da7dfd1c3c7830b3203fffdaea55b0cf /src/nxt_event_engine.h
parent752038eea857988045ce72252e0d1c19509981b3 (diff)
downloadunit-bfa808d68997d74bfe0d54196bbbb649646787c1.tar.gz
unit-bfa808d68997d74bfe0d54196bbbb649646787c1.tar.bz2
Event engine memory cache for nxt_sockaddr_t.
Introducing event engine memory cache and using the cache for nxt_sockaddr_t structures.
Diffstat (limited to 'src/nxt_event_engine.h')
-rw-r--r--src/nxt_event_engine.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nxt_event_engine.h b/src/nxt_event_engine.h
index 57776a06..329a5a64 100644
--- a/src/nxt_event_engine.h
+++ b/src/nxt_event_engine.h
@@ -491,6 +491,7 @@ struct nxt_event_engine_s {
nxt_queue_t joints;
nxt_queue_t listen_connections;
nxt_queue_t idle_connections;
+ nxt_array_t *mem_cache;
nxt_queue_link_t link;
// STUB: router link
@@ -511,6 +512,11 @@ NXT_EXPORT void nxt_event_engine_post(nxt_event_engine_t *engine,
NXT_EXPORT void nxt_event_engine_signal(nxt_event_engine_t *engine,
nxt_uint_t signo);
+void *nxt_event_engine_mem_alloc(nxt_event_engine_t *engine, uint32_t *slot,
+ size_t size);
+void nxt_event_engine_mem_free(nxt_event_engine_t *engine, uint32_t *slot,
+ void *p);
+
nxt_inline nxt_event_engine_t *
nxt_thread_event_engine(void)