自实现内存池:按大小分桶,8bit跨度,支持释放。

resp协议pipline测试。
This commit is contained in:
1iaan
2026-01-25 10:07:11 +00:00
parent ba2004c258
commit 9e757ece87
22 changed files with 515 additions and 11388 deletions

View File

@@ -103,7 +103,7 @@ int event_register(int fd, int event) {
memset(conn_list[fd].rbuffer, 0, BUFFER_LENGTH);
conn_list[fd].rlength = 0;
memset(conn_list[fd].wbuffer, 0, BUFFER_LENGTH);
memset(conn_list[fd].wbuffer, 0, BUFFER_LENGTH*2);
conn_list[fd].wlength = 0;
conn_list[fd].is_from_master = 0;
@@ -407,6 +407,7 @@ int reactor_start(unsigned short port, msg_handler handler, char *m_ip, int m_po
#else
if (events[i].events & EPOLLIN) {
// printf("connlist:%p, r_action:%p, recv_callaback:%p\n", &conn_list[connfd], &conn_list[connfd].r_action, conn_list[connfd].r_action.recv_callback);
conn_list[connfd].r_action.recv_callback(connfd);
}