Remove unused netmgr->worker->sendbuf
By inspecting the code, it was discovered that .sendbuf member of the isc__nm_networker_t was unused and just consuming ~64k per worker. Remove the member and the association allocation/deallocation.
This commit is contained in:
@@ -71,11 +71,6 @@
|
||||
? ISC_NETMGR_UDP_RECVBUF_SIZE \
|
||||
: ISC_NETMGR_TCP_RECVBUF_SIZE)
|
||||
|
||||
/*
|
||||
* Send buffer
|
||||
*/
|
||||
#define ISC_NETMGR_SENDBUF_SIZE (sizeof(uint16_t) + UINT16_MAX)
|
||||
|
||||
/*
|
||||
* Make sure our RECVBUF size is large enough
|
||||
*/
|
||||
@@ -193,7 +188,6 @@ typedef struct isc__networker {
|
||||
bool shuttingdown;
|
||||
|
||||
char *recvbuf;
|
||||
char *sendbuf;
|
||||
bool recvbuf_inuse;
|
||||
|
||||
ISC_LIST(isc_nmsocket_t) active_sockets;
|
||||
|
||||
@@ -230,8 +230,6 @@ isc_netmgr_create(isc_mem_t *mctx, isc_loopmgr_t *loopmgr, isc_nm_t **netmgrp) {
|
||||
*worker = (isc__networker_t){
|
||||
.recvbuf = isc_mem_get(loop->mctx,
|
||||
ISC_NETMGR_RECVBUF_SIZE),
|
||||
.sendbuf = isc_mem_get(loop->mctx,
|
||||
ISC_NETMGR_SENDBUF_SIZE),
|
||||
.active_sockets = ISC_LIST_INITIALIZER,
|
||||
};
|
||||
|
||||
@@ -2320,7 +2318,6 @@ isc__networker_destroy(isc__networker_t *worker) {
|
||||
|
||||
isc_mempool_destroy(&worker->uvreq_pool);
|
||||
|
||||
isc_mem_put(worker->mctx, worker->sendbuf, ISC_NETMGR_SENDBUF_SIZE);
|
||||
isc_mem_putanddetach(&worker->mctx, worker->recvbuf,
|
||||
ISC_NETMGR_RECVBUF_SIZE);
|
||||
isc_nm_detach(&netmgr);
|
||||
|
||||
Reference in New Issue
Block a user