⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rvobjpool.h

📁 基于h323协议的软phone
💻 H
📖 第 1 页 / 共 2 页
字号:
	{include: rvobjpool.h}
	{description:
		{p: Gets the total number of pages in an object pool.}
	}
	{proto: RvSize_t RvObjPoolTotalPages(RvObjPool *objpool);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to get information about.}}
	}
	{returns: Total number of pages in the object pool.}
}
$*/
/*$
{function:
	{name: RvObjPoolItemsPerPage}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Gets the number of items per page in an object pool.}
	}
	{proto: RvSize_t RvObjPoolItemsPerPage(RvObjPool *objpool);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to get information about.}}
	}
	{returns: Number of items per page in the object pool.}
}
$*/
/*$
{function:
	{name: RvObjPoolBlockSize}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Gets the actual size of the memory block used by each item.}
	}
	{proto: RvSize_t RvObjPoolBlockSize(RvObjPool *objpool);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to get information about.}}
	}
	{returns: Actual size of the memory block used by each item.}
}
$*/
/*$
{function:
	{name: RvObjPoolPageSize}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Gets the page size (in bytes) of an object pool.}
	}
	{proto: RvSize_t RvObjPoolPageSize(RvObjPool *objpool);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to get information about.}}
	}
	{returns: Page size, in bytes, of the object pool.}
}
$*/
/*$
{function:
	{name: RvObjPoolGetMaxitems}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Gets the current maxitems setting. This is the maximum size that
			the object pool may be.}
	}
	{proto: RvSize_t RvObjPoolGetMaxitems(RvObjPool *objpool);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to get information about.}}
	}
	{returns: Maximum number of items allowed in the object pool.}
	{notes:
		{note:  The actual maximum number of items that may be in the pool may
				be less than this amount since items are allocated a page at a
				time.}
	}

}
$*/
/*$
{function:
	{name: RvObjPoolSetMaxitems}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Sets the current maxitems setting. This is the maximum size that
			the object pool may be.}
	}
	{proto: RvBool RvObjPoolSetMaxitems(RvObjPool *objpool, RvSize_t newmax);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to set maxitems for.}}
		{param: {n: new} {d: New value for maxitems (0 = no maximum).}}
	}
	{returns: RV_TRUE if maxitems set successfully, otherwise RV_FALSE.}
	{notes:
		{note:  The actual maximum number of items that may be in the pool may
				be less than this amount since items are allocated a page at a
				time.}
		{note:  Setting maxitems to be lower than minitems or to a value smaller
				than the current size ifs not allowed.}
		{note:  This setting should not normally be used for FIXED pools.}
	}

}
$*/
/*$
{function:
	{name: RvObjPoolGetMinitems}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Gets the current minitems setting. This is the minimum size that
			the object pool may be.}
	}
	{proto: RvSize_t RvObjPoolGetMinitems(RvObjPool *objpool);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to get information about.}}
	}
	{returns: Minimum number of items allowed in the object pool.}
	{notes:
		{note:  The actual minimum number of items that may be in the pool may
				be larger than this amount since items are allocated a page at a
				time.}
	}

}
$*/
/*$
{function:
	{name: RvObjPoolSetMinitems}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Sets the current minitems setting. This is the minimum size that
			the object pool may be.}
	}
	{proto: RvBool RvObjPoolSetMinitems(RvObjPool *objpool, RvSize_t newmin);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to set minitems for.}}
		{param: {n: new} {d: New value for minitems.}}
	}
	{returns: RV_TRUE if minitems set successfully, otherwise RV_FALSE.}
	{notes:
		{note:  The actual minimum number of items that may be in the pool may
				be larger than this amount since items are allocated a page at a
				time.}
		{note:  Setting minitems to be larger than maxitems is not allowed.}
		{note:  This setting should not normally be used for FIXED pools.}
	}
}
$*/
/*$
{function:
	{name: RvObjPoolGetFreelevel}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Gets the current freelevel setting. This is the minimum number of free items
			per 100 that should be maintained.}
	}
	{proto: RvSize_t RvObjPoolGetFreeLevel(RvObjPool *objpool);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to get information about.}}
	}
	{returns: Minumum number of free items per 100 to be maintained (0 to 100).}
}
$*/
/*$
{function:
	{name: RvObjPoolSetFreelevel}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Sets the current freelevel setting. This is the minimum number of free items
			per 100 that should be maintained.}
	}
	{proto: RvBool RvObjPoolSetFreelevel(RvObjPool *objpool, RvSize_t newlevel);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to set freelevel for.}}
		{param: {n: newlevel} {d: New value for freelevel.}}
	}
	{returns: RV_TRUE if freelevel set successfully, otherwise RV_FALSE.}
	{notes:
		{note:  The freelevel setting is only used for DYNAMIC pools.}
		{note:  Setting freelevel to 0 will cause a page to be released as soon
				as it has all items returned to it.}
		{note:  Setting freelevel to 100 will never release pages and is the
				equivalent of using an EXPANDED pool.}
	}
}
$*/
/*$
{function:
	{name: RvObjPoolAddItems}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Adds the requested number of items to a pool.}
	}
	{proto: RvSize_t RvObjPoolAddItems(RvObjPool *objpool, RvSize_t numitems);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to add items to.}}
		{param: {n: numitems} {d: Number of items to add (0 indicates to add a page of items).}}
	}
	{returns: Actual number of items added.}
	{notes:
		{note:  The actual number of items added may be larger than that
				requested since items are added in multiples of the number
				of items in a page.}
		{note:  If the actual number of items is less than that requested
				it means that those items could not be added because
				no more pages could be allocated, no more items could
				be constructed, or the maxitems limit was reached.}
	}
}
$*/
/*$
{function:
	{name: RvObjPoolAddPages}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Adds the requested number of pages to a pool.}
	}
	{proto: RvSize_t RvObjPoolAddPages(RvObjPool *objpool, RvSize_t numpages);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to add pages to.}}
		{param: {n: numpages} {d: Number of pages to add.}}
	}
	{returns: Actual number of pages added.}
	{notes:
		{note:  If the actual number of items is less than that requested
				it means that those items could not be added because
				no more pages could be allocated, no more items could
				be constructed, or the maxitems limit was reached.}
	}
}
$*/
/*$
{function:
	{name: RvObjPoolSalvage}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Release any pages in an object pool which have no items allocated from them.}
	}
	{proto: RvSize_t RvObjPoolSalvage(RvObjPool *objpool);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to salvage.}}
	}
	{returns: Actual number of pages released.}
	{notes:
		{note:  Calling this function on an object pool which had the salvage option
				disbaled will do nothing (and return a 0).}
		{note:  The number of pages released is limited by the minitems setting.}
	}
}
$*/
/*$
{function:
	{name: RvObjPoolGetItem}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Get an item from a pool.}
	}
	{proto: void *RvObjPoolgetItem(RvObjPool *objpool);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to get item from.}}
	}
	{returns: Pointer to object allocated or NULL is none are available.}
	{notes:
		{note:  Items may only be returned to the pool they came from.}
	}
}
$*/
/*$
{function:
	{name: RvObjPoolReleaseItem}
	{superpackage: ObjPool}
	{include: rvobjpool.h}
	{description:
		{p: Returns an item back to a pool.}
	}
	{proto: void *RvObjPoolReleaseItem(RvObjPool *objpool, void *item);}
	{params:
		{param: {n: objpool} {d: Pointer to object pool to return item to.}}
		{param: {n: item} {d: Pointer to item to be returned.}}
	}
	{returns: RV_TRUE if successful otherwise RV_FALSE.}
}
$*/

#endif /* RV_OBJPOOL_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -