示例#1
0
/*
 * 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);
}
示例#2
0
文件: dlink.c 项目: danopia/atheme
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);
	}
}
示例#3
0
文件: dbuf.c 项目: mdharris/ircd
void
dbuf_init(void)
{
  dbuf_heap = BlockHeapCreate("dbuf", sizeof(struct dbuf_block), DBUF_HEAP_SIZE);
}
示例#4
0
文件: list.c 项目: Adam-/oftc-hybrid
/* 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);
}
示例#5
0
void
linebuf_init(void)
{
	linebuf_heap = BlockHeapCreate(sizeof(buf_line_t), LINEBUF_HEAP_SIZE);
	eventAddIsh("linebuf_garbage_collect", linebuf_garbage_collect, NULL, 30);
}
示例#6
0
void
linebuf_init(void)
{
	linebuf_heap = BlockHeapCreate(sizeof(buf_line_t), LINEBUF_HEAP_SIZE);
}