Commit 48418c8c authored by Marek Vavruša's avatar Marek Vavruša

udp/tcp: updated default buffer size to approx. 16 pages

parent e60d5a09
......@@ -315,7 +315,7 @@ int tcp_master(dthread_t *thread)
/* Create big enough memory cushion. */
mm_ctx_t mm;
mm_ctx_mempool(&mm, 4 * sizeof(knot_pkt_t));
mm_ctx_mempool(&mm, 16 * MM_DEFAULT_BLKSIZE);
/* Create TCP answering context. */
tcp.server = handler->server;
......
......@@ -507,7 +507,7 @@ int udp_master(dthread_t *thread)
/* Create big enough memory cushion. */
mm_ctx_t mm;
mm_ctx_mempool(&mm, 4 * sizeof(knot_pkt_t));
mm_ctx_mempool(&mm, 16 * MM_DEFAULT_BLKSIZE);
udp.overlay.mm = &mm;
/* Chose select as epoll/kqueue has larger overhead for a
......
......@@ -119,7 +119,7 @@ void zone_update_init(zone_update_t *update, const zone_contents_t *zone, change
{
update->zone = zone;
update->change = change;
mm_ctx_mempool(&update->mm, 4096);
mm_ctx_mempool(&update->mm, MM_DEFAULT_BLKSIZE);
}
const zone_node_t *zone_update_get_node(zone_update_t *update, const knot_dname_t *dname)
......
......@@ -210,7 +210,7 @@ int main(int argc, char *argv[])
plan_lazy();
mm_ctx_t pool;
mm_ctx_mempool(&pool, 4096);
mm_ctx_mempool(&pool, MM_DEFAULT_BLKSIZE);
/* Temporary DB identifier. */
char dbid_buf[] = "/tmp/namedb.XXXXXX";
......
......@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
/* Create memory pool context. */
int ret = 0;
mm_ctx_t mm;
mm_ctx_mempool(&mm, sizeof(knot_pkt_t));
mm_ctx_mempool(&mm, MM_DEFAULT_BLKSIZE);
/* Create names and data. */
knot_dname_t* dnames[NAMECOUNT] = {0};
......
......@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
/* Create processing context. */
mm_ctx_t mm;
mm_ctx_mempool(&mm, sizeof(knot_pkt_t));
mm_ctx_mempool(&mm, MM_DEFAULT_BLKSIZE);
knot_layer_t proc;
memset(&proc, 0, sizeof(knot_layer_t));
......
......@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
plan(8*6 + 4); /* exec_query = 6 TAP tests */
mm_ctx_t mm;
mm_ctx_mempool(&mm, sizeof(knot_pkt_t));
mm_ctx_mempool(&mm, MM_DEFAULT_BLKSIZE);
/* Create processing context. */
knot_layer_t proc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment