Jabberd14-1.6.0/jabberd/lib/pool.c/_pool_cleanup_append

Last-modified: 2007-03-05 (月) 21:09:18

このページを編集する際は,編集に関する方針に従ってください.

概要

* append a pool_cleaner function (callback) to a pool
*
* mem should always be freed last
*
* All appended pool_cleaner functions will be called if a pool is freed.
* This might be used to clean logically subpools.

引数

* @param p to which pool the pool_cleaner should be added
* @param pf structure containing the reference to the pool_cleaner and links for the list

実装

  • メモリプールpool参照

pfをcleanupリストの最後に追加する。

void _pool_cleanup_append(pool p, struct pfree *pf)
{
    struct pfree *cur;
    if(p->cleanup == NULL)
    {
	 p->cleanup = pf;
	 return;
    }
    /* fast forward to end of list */
    for(cur = p->cleanup; cur->next != NULL; cur = cur->next);
    cur->next = pf;
}

呼出元

Jabberd14-1.6.0/jabberd/lib/pool.c/pmalloc

#related: relatedプラグインは廃止されました。