亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? memlib.c

?? vxworks的開發(fā)
?? C
?? 第 1 頁 / 共 3 頁
字號:
	    		    partId, pBlock, 2* (pHdr->nWords), nBytes);#endif	    partId->curWordsAllocated += pNextHdr->nWords;	/* fix stats */	    partId->cumWordsAllocated += pNextHdr->nWords;	    NEXT_HDR (pHdr)->pPrevHdr = pHdr;			/* fix next */	    /* if this combined block is too big, it will get fixed below */	    }	}    /* split off any extra and give it back;     * note that this covers both the case of a realloc for smaller space     * and the case of a realloc for bigger space that caused a coalesce     * with the next block that resulted in larger than required block */    pNextHdr = memBlockSplit (pHdr, pHdr->nWords - nWords,			      partId->minBlockWords);    semGive (&partId->sem);    if (pNextHdr != NULL)	{	(void) memPartFree (partId, HDR_TO_BLOCK (pNextHdr));	partId->curBlocksAllocated++;	/* memPartFree() is going to subtract one from the curBlocksAllocated	 * statistic. Since memPartRealloc() should not change the value of	 * curBlocksAllocated, it has to be corrected  (SPR 1407 & 3564)	 */	}    return ((void *) pBlock);    }/********************************************************************************* memPartFindMax - find the size of the largest available free block** This routine searches for the largest block in the memory partition free* list and returns its size.** RETURNS: The size, in bytes, of the largest available block.** ERRNO: S_smObjLib_NOT_INITIALIZED** SEE ALSO: smMemLib*/int memPartFindMax     (    FAST PART_ID partId         /* partition ID */    )    {    FAST BLOCK_HDR *	pHdr;    FAST DL_NODE *	pNode;    FAST unsigned	biggestWords = 0;    if (ID_IS_SHARED (partId))  /* partition is shared? */	{	if (smMemPartFindMaxRtn == NULL)	    {	    errno = S_smObjLib_NOT_INITIALIZED;	    return (ERROR);	    }        return ((*smMemPartFindMaxRtn) (SM_OBJ_ID_TO_ADRS (partId)));	}    /* partition is local */    if (OBJ_VERIFY (partId, memPartClassId) != OK)	return (ERROR);    semTake (&partId->sem, WAIT_FOREVER);    /* go through free list and find largest free */    for (pNode = DLL_FIRST (&partId->freeList);	 pNode != NULL;	 pNode = DLL_NEXT (pNode))	{	pHdr = NODE_TO_HDR (pNode);	if (pHdr->nWords > biggestWords)	    biggestWords = pHdr->nWords;	}    semGive (&partId->sem);    return (2 * biggestWords - sizeof (BLOCK_HDR));    }/********************************************************************************* memPartAllocError - handle allocation error*/LOCAL void memPartAllocError     (    PART_ID pPart,    unsigned nBytes     )    {    if ((_func_logMsg != NULL) &&	(pPart->options & MEM_ALLOC_ERROR_LOG_FLAG))	(* _func_logMsg) (memMsgBlockTooBig, nBytes, (int) pPart, 0, 0, 0, 0);    }/********************************************************************************* memPartBlockError - handle invalid block error*/LOCAL void memPartBlockError     (    PART_ID pPart,    char *pBlock,    char *label     )    {    if ((_func_logMsg != NULL) &&        (pPart->options & MEM_BLOCK_ERROR_LOG_FLAG))        (* _func_logMsg) (memMsgBlockError, (int)label, (int) pBlock, 			  (int) pPart, 0, 0, 0);    }/******************************************************************************* memBlockSplit - split a block into two blocks** This routine splits the block pointed to into two blocks.  The second* block will have nWords words in it.  A pointer is returned to this block.* If either resultant block would end up having less than minWords in it,* NULL is returned.** RETURNS: A pointer to the second block, or NULL.*/LOCAL BLOCK_HDR *memBlockSplit     (    FAST BLOCK_HDR *pHdr,    unsigned nWords,            /* number of words in second block */    unsigned minWords           /* min num of words allowed in a block */    )    {    FAST unsigned wordsLeft;    FAST BLOCK_HDR *pNewHdr;    /* check if block can be split */    if ((nWords < minWords) ||        ((wordsLeft = (pHdr->nWords - nWords)) < minWords))        return (NULL);                  /* not enough space left */    /* adjust original block size and create new block */    pHdr->nWords = wordsLeft;    pNewHdr = NEXT_HDR (pHdr);    pNewHdr->pPrevHdr = pHdr;    pNewHdr->nWords   = nWords;    pNewHdr->free     = pHdr->free;    /* fix next block */    NEXT_HDR (pNewHdr)->pPrevHdr = pNewHdr;    return (pNewHdr);    }/********************************************************************************* memOptionsSet - set the debug options for the system memory partition** This routine sets the debug options for the system memory partition.* Two kinds of errors are detected:  attempts to allocate more memory than* is available, and bad blocks found when memory is freed.  In both cases,* the following options can be selected for actions to be taken when the error* is detected:  (1) return the error status, (2) log an error message and* return the error status, or (3) log an error message and suspend the* calling task.** These options are discussed in detail in the library manual* entry for memLib.** RETURNS: N/A** SEE ALSO: memPartOptionsSet()*/void memOptionsSet     (    unsigned options    /* options for system partition */    )    {    memPartOptionsSet (memSysPartId, options);    }/********************************************************************************* calloc - allocate space for an array (ANSI)** This routine allocates a block of memory for an array that contains* <elemNum> elements of size <elemSize>.  This space is initialized to* zeros.** RETURNS:* A pointer to the block, or NULL if the call fails.** SEE ALSO:* .I "American National Standard for Information Systems -"* .I "Programming Language - C, ANSI X3.159-1989: General Utilities (stdlib.h)"*/void *calloc     (    size_t elemNum,	/* number of elements */    size_t elemSize	/* size of elements */    )    {    FAST void *pMem;    FAST size_t nBytes = elemNum * elemSize;        if ((pMem = memPartAlloc (memSysPartId, (unsigned) nBytes)) != NULL)	bzero ((char *) pMem, (int) nBytes);    return (pMem);    }/********************************************************************************* realloc - reallocate a block of memory (ANSI)** This routine changes the size of a specified block of memory and returns a* pointer to the new block of memory.  The contents that fit inside the new* size (or old size if smaller) remain unchanged.  The memory alignment of* the new block is not guaranteed to be the same as the original block.** RETURNS:* A pointer to the new block of memory, or NULL if the call fails.** SEE ALSO:* .I "American National Standard for Information Systems -"* .I "Programming Language - C, ANSI X3.159-1989: General Utilities (stdlib.h)"*/void *realloc     (    void *pBlock,	/* block to reallocate */    size_t newSize	/* new block size */    )    {        return (memPartRealloc (memSysPartId, (char *) pBlock, 				(unsigned) newSize));    }/********************************************************************************* cfree - free a block of memory** This routine returns to the free memory pool a block of memory * previously allocated with calloc().** It is an error to free a memory block that was not previously allocated.** RETURNS: OK, or ERROR if the the block is invalid.*/STATUS cfree     (    char *pBlock        /* pointer to block of memory to free */    )    {    return (memPartFree (memSysPartId, pBlock));    }/********************************************************************************* memFindMax - find the largest free block in the system memory partition** This routine searches for the largest block in the system memory partition* free list and returns its size.** RETURNS: The size, in bytes, of the largest available block.** SEE ALSO: memPartFindMax()*/int memFindMax (void)    {    return (memPartFindMax (memSysPartId));    }/********************************************************************************* memSemInit - initialize the partition semaphore as type mutex** This routine initializes the partition semaphore as a mutex semaphore with* the mutex options stored in mutexOptionsMemLib.  This function is called* indirectly from memPartInit ().  This coupling allows alternative semaphore* types to serve as the basis for memory partition interlocking.*/LOCAL void memSemInit    (    PART_ID partId		/* partition to initialize semaphore for */    )    {    semMInit (&partId->sem, mutexOptionsMemLib);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久一区麻豆最新章节| 成人aaaa免费全部观看| 欧美日韩精品福利| 亚洲一区中文日韩| 337p亚洲精品色噜噜狠狠| 日本不卡不码高清免费观看| 欧美成人精品高清在线播放| 国产一区二区三区久久久 | 国产欧美精品一区| 欧美日本不卡视频| 视频一区国产视频| 精品国产一区a| 成人久久久精品乱码一区二区三区| 国产色爱av资源综合区| 91在线porny国产在线看| 亚洲综合免费观看高清完整版在线| 6080午夜不卡| 成人国产亚洲欧美成人综合网| 亚洲视频一区二区在线| 欧美日韩不卡在线| 国产精品亚洲第一| 午夜伦欧美伦电影理论片| 欧美电影免费提供在线观看| 国产.欧美.日韩| 亚洲成av人片一区二区| 精品国产91乱码一区二区三区| 成人av网站免费| 免费欧美日韩国产三级电影| 国产网站一区二区三区| 欧美综合一区二区三区| 美女网站视频久久| 亚洲精品中文在线影院| 日韩精品一区二区三区中文不卡| 不卡一二三区首页| 日本 国产 欧美色综合| 亚洲人成在线观看一区二区| 日韩天堂在线观看| 91高清视频免费看| 国产成人av福利| 免费观看在线综合| 亚洲图片自拍偷拍| 国产精品无人区| 日韩欧美国产系列| 欧美丝袜丝交足nylons图片| 国产精品一区二区三区乱码| 日韩在线观看一区二区| 亚洲同性同志一二三专区| 欧美大片日本大片免费观看| 在线日韩国产精品| 成人av在线一区二区| 麻豆成人久久精品二区三区红| 一区二区三区中文字幕电影| 国产欧美日韩综合精品一区二区| 日韩一级高清毛片| 欧美日韩国产高清一区二区| 97久久超碰精品国产| 国产精品综合视频| 免费成人在线观看| 日本美女一区二区三区| 午夜精品一区在线观看| 亚洲男人的天堂在线aⅴ视频| 国产视频一区二区在线观看| 日韩三级电影网址| 欧美一区二区三区在线| 欧美午夜一区二区三区| 色美美综合视频| 91天堂素人约啪| 91丨九色丨蝌蚪丨老版| 成人精品在线视频观看| 国产成a人亚洲精| 成人av免费在线| 成人免费黄色在线| 91丨porny丨蝌蚪视频| 99久久精品一区| 91网页版在线| 亚洲精品一区二区在线观看| 日韩一级精品视频在线观看| 日韩欧美亚洲国产另类| 日韩一区二区三区视频在线| 91精品国产综合久久久蜜臀图片| 欧美日韩卡一卡二| 欧美精品少妇一区二区三区| 欧美日韩亚洲综合| 91精品国产日韩91久久久久久| 91精品婷婷国产综合久久竹菊| 在线电影国产精品| 日韩限制级电影在线观看| 日韩免费电影网站| 久久午夜羞羞影院免费观看| 国产亚洲成av人在线观看导航| 中文字幕精品在线不卡| 中文字幕一区二区5566日韩| 亚洲欧美精品午睡沙发| 亚洲一区二区精品久久av| 日韩精品乱码av一区二区| 免费国产亚洲视频| 丁香一区二区三区| 日本黄色一区二区| 欧美高清你懂得| 亚洲精品一区二区三区福利| 国产欧美日韩一区二区三区在线观看| 中文字幕五月欧美| 偷拍一区二区三区四区| 久久99最新地址| 99精品黄色片免费大全| 欧美系列日韩一区| 久久欧美一区二区| 亚洲精选在线视频| 久久精品噜噜噜成人88aⅴ| 国产精品亚洲а∨天堂免在线| 99视频超级精品| 欧美精品xxxxbbbb| 欧美韩国日本一区| 婷婷综合在线观看| 成人丝袜视频网| 欧美高清精品3d| 中文一区二区完整视频在线观看| 一区二区在线免费| 国产精品99久| 欧美日韩亚洲综合一区二区三区| 国产午夜亚洲精品不卡| 亚洲综合丝袜美腿| 国产成人精品午夜视频免费| 欧美日韩精品一区二区在线播放| 久久综合给合久久狠狠狠97色69| 亚洲激情自拍偷拍| 成人在线视频首页| 日韩欧美中文字幕一区| 亚洲欧美成人一区二区三区| 久久国产福利国产秒拍| 在线亚洲一区观看| 中文字幕乱码日本亚洲一区二区| 三级久久三级久久久| 成人激情免费网站| 欧美大片一区二区| 天天免费综合色| av高清久久久| 国产农村妇女精品| 韩国女主播成人在线观看| 欧美色视频一区| 亚洲三级视频在线观看| 精品一区二区三区免费播放| 精品视频色一区| 樱花草国产18久久久久| 国产福利一区二区| 精品国偷自产国产一区| 午夜精品久久久久久久99水蜜桃| 97久久精品人人做人人爽| 久久久久久久免费视频了| 男人的天堂亚洲一区| 在线不卡a资源高清| 一区二区欧美精品| 2024国产精品| 强制捆绑调教一区二区| 欧美精品vⅰdeose4hd| 亚洲成人资源在线| 91福利精品视频| 亚洲精品videosex极品| 色婷婷亚洲婷婷| 亚洲视频 欧洲视频| www.综合网.com| 国产精品热久久久久夜色精品三区 | 国产目拍亚洲精品99久久精品| 国产在线精品一区二区| 日韩午夜在线观看| 裸体健美xxxx欧美裸体表演| 7777精品伊人久久久大香线蕉| 亚洲福利一二三区| 欧美日韩亚洲国产综合| 亚洲bt欧美bt精品777| 欧美日韩精品系列| 肉色丝袜一区二区| 日韩欧美中文字幕公布| 黄色小说综合网站| 国产日韩欧美精品在线| 不卡影院免费观看| 亚洲另类一区二区| 色吧成人激情小说| 视频在线观看一区二区三区| 欧美精品成人一区二区三区四区| 青青草原综合久久大伊人精品优势| 8x8x8国产精品| 国产麻豆成人传媒免费观看| 国产精品欧美经典| 色94色欧美sute亚洲13| 五月综合激情网| 日韩精品一区二区三区视频| 国产美女在线观看一区| 中文字幕亚洲电影| 欧美日韩国产综合久久 | 国产视频在线观看一区二区三区 | 日本sm残虐另类| 久久人人爽爽爽人久久久| 成人小视频在线| 亚洲国产日韩av| 精品国产一区二区三区av性色| 99在线精品观看| 日本美女一区二区三区视频| 久久精品日韩一区二区三区| 91蜜桃在线免费视频|