/* * init_client * * inputs - NONE * output - NONE * side effects - initialize client free memory */ void init_client(void) { remote_client_count = 0; local_client_count = 0; /* * start off the check ping event .. -- adrian * Every 30 seconds is plenty -- db */ client_heap = BlockHeapCreate(sizeof(struct Client), CLIENT_HEAP_SIZE); lclient_heap = BlockHeapCreate(sizeof(struct LocalUser), LCLIENT_HEAP_SIZE); eventAddIsh("check_pings", check_pings, NULL, 30); eventAddIsh("free_exited_clients", &free_exited_clients, NULL, 4); eventAddIsh("client_heap_gc", client_heap_gc, NULL, 30); }
void init_dlink_nodes(void) { node_heap = BlockHeapCreate(sizeof(node_t), HEAP_NODE); if (!node_heap) { slog(LG_INFO, "init_dlink_nodes(): block allocator failure."); exit(EXIT_FAILURE); } }
void dbuf_init(void) { dbuf_heap = BlockHeapCreate("dbuf", sizeof(struct dbuf_block), DBUF_HEAP_SIZE); }
/* init_dlink_nodes() * * inputs - NONE * output - NONE * side effects - initializes the dnode BlockHeap */ void init_dlink_nodes(void) { dnode_heap = BlockHeapCreate("dlink node", sizeof(dlink_node), DNODE_HEAP_SIZE); }
void linebuf_init(void) { linebuf_heap = BlockHeapCreate(sizeof(buf_line_t), LINEBUF_HEAP_SIZE); eventAddIsh("linebuf_garbage_collect", linebuf_garbage_collect, NULL, 30); }
void linebuf_init(void) { linebuf_heap = BlockHeapCreate(sizeof(buf_line_t), LINEBUF_HEAP_SIZE); }