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

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

?? memlib.c

?? Vxworks的系統源代碼Vxworks的系統源代碼Vxworks的系統源代碼Vxworks的系統源代碼Vxworks的系統源代碼
?? 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一区二区三区免费野_久草精品视频
欧美最猛黑人xxxxx猛交| 久久亚洲春色中文字幕久久久| 欧洲国产伦久久久久久久| 欧美一级生活片| 亚洲欧美一区二区三区极速播放| 极品少妇一区二区| 欧美视频你懂的| 国产精品国产a级| 国产一区二区女| 91麻豆精品国产91久久久更新时间| 国产精品久久久久久久久免费相片| 久久精品国产网站| 欧美精品自拍偷拍动漫精品| 最近中文字幕一区二区三区| 黄色日韩三级电影| 91精品国产一区二区三区 | 日韩1区2区日韩1区2区| 成人美女在线观看| 久久久久国产精品厨房| 蜜臀av性久久久久av蜜臀妖精| 欧美综合天天夜夜久久| 亚洲免费视频中文字幕| 91在线观看美女| 国产精品色眯眯| 大胆亚洲人体视频| 国产欧美日韩卡一| 懂色av中文字幕一区二区三区| 久久精品网站免费观看| 国产精品亚洲视频| 久久精品网站免费观看| 国产一区不卡视频| 久久九九全国免费| 粉嫩蜜臀av国产精品网站| 国产日韩在线不卡| 成人av免费在线观看| 国产精品久久久久久久裸模| 不卡一区二区三区四区| 亚洲色图丝袜美腿| 一本色道久久综合狠狠躁的推荐 | 成人免费视频国产在线观看| 国产清纯白嫩初高生在线观看91 | 91麻豆精品91久久久久同性| 男男视频亚洲欧美| 日韩精品中文字幕在线一区| 国产一区 二区| 国产精品国产三级国产三级人妇 | 成人av资源网站| 亚洲综合色在线| 日韩欧美一区在线| 国产精品一区二区无线| 亚洲欧美在线高清| 欧美精品1区2区| 国产在线播放一区三区四| 国产日韩成人精品| 91久久国产综合久久| 蜜臀a∨国产成人精品| 久久精品综合网| 在线免费亚洲电影| 精品一区二区三区视频| 中文字幕佐山爱一区二区免费| 欧美日韩三级视频| 国产一区二区伦理片| 亚洲免费在线视频一区 二区| 欧美日韩国产首页在线观看| 国产精品香蕉一区二区三区| 亚洲人xxxx| 日韩三级视频在线观看| 99热99精品| 蜜乳av一区二区三区| 亚洲欧美日韩国产成人精品影院| 欧美色图在线观看| 国产盗摄一区二区| 三级久久三级久久| 国产精品另类一区| 精品欧美一区二区久久| 色综合天天综合网国产成人综合天 | 91精品1区2区| 国产成人av一区| 日日夜夜精品视频免费| 成人免费在线观看入口| 26uuu精品一区二区在线观看| 欧美性受xxxx黑人xyx| 福利一区福利二区| 裸体在线国模精品偷拍| 亚洲免费电影在线| 国产精品人成在线观看免费 | 国内精品写真在线观看| 亚洲一区二区三区四区在线免费观看| 久久精品男人天堂av| 91精品国产91热久久久做人人 | 亚洲综合免费观看高清完整版在线 | 麻豆精品久久久| 亚洲成人资源网| 亚洲免费在线播放| 国产精品你懂的在线| 久久综合狠狠综合久久综合88 | 欧美亚洲禁片免费| 99综合影院在线| 丁香婷婷综合激情五月色| 国内精品嫩模私拍在线| 美女久久久精品| 青青草原综合久久大伊人精品| 亚洲主播在线观看| 亚洲永久免费视频| 亚洲人成人一区二区在线观看| 国产精品三级久久久久三级| 国产日韩精品一区二区三区在线| 欧美一二三在线| 日韩午夜av电影| 日韩女优视频免费观看| 日韩一区二区三区视频在线| 欧美日韩成人综合在线一区二区| 欧美视频中文字幕| 欧美日韩在线亚洲一区蜜芽| 欧美三级在线视频| 在线播放国产精品二区一二区四区| 欧美中文字幕久久| 欧美精选一区二区| 精品国产91洋老外米糕| 精品免费视频.| 欧美激情中文不卡| 1024成人网色www| 夜夜精品浪潮av一区二区三区| 一区二区欧美国产| 亚洲小说春色综合另类电影| 午夜成人免费电影| 久久精品国产澳门| 国产精品一区二区久久不卡 | 99视频精品在线| 91久久精品国产91性色tv| 欧美日韩三级一区| 日韩欧美精品在线视频| 久久久不卡网国产精品二区| 国产精品久久久久久亚洲毛片| 亚洲精品国产高清久久伦理二区| 亚洲成av人片在线观看| 激情小说亚洲一区| 不卡的电影网站| 在线播放亚洲一区| 国产欧美一区二区三区网站| 中文字幕亚洲在| 五月天中文字幕一区二区| 久久91精品久久久久久秒播 | 国产精品影视网| 色综合久久66| 欧美www视频| 亚洲人妖av一区二区| 日韩黄色小视频| 成人app下载| 日韩一二三区视频| 亚洲人亚洲人成电影网站色| 日本亚洲一区二区| 成人av电影在线| 91精品国产美女浴室洗澡无遮挡| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 一卡二卡三卡日韩欧美| 麻豆91免费观看| 在线观看日韩电影| 中文字幕乱码亚洲精品一区| 天天综合色天天综合色h| 国产成人av电影免费在线观看| 欧美日韩你懂的| 国产精品久久久久久妇女6080 | 在线亚洲免费视频| 国产日韩精品一区二区浪潮av| 亚洲成人手机在线| 99热在这里有精品免费| 久久嫩草精品久久久精品| 亚洲成人av一区二区三区| 波多野结衣亚洲一区| 精品蜜桃在线看| 亚洲成人中文在线| 色成年激情久久综合| 国产欧美日韩不卡免费| 久久草av在线| 日韩一区二区在线观看视频| 亚洲尤物视频在线| 97精品国产露脸对白| 国产亚洲人成网站| 国产一区二区三区免费| 欧美一区二区不卡视频| 亚欧色一区w666天堂| 日本精品视频一区二区| 专区另类欧美日韩| 丁香桃色午夜亚洲一区二区三区| 日韩午夜小视频| 麻豆精品新av中文字幕| 欧美一区二区高清| 五月天一区二区三区| 欧美在线不卡一区| 亚洲一区二区美女| 欧美午夜视频网站| 亚洲国产成人av好男人在线观看| 99re8在线精品视频免费播放| 国产精品日日摸夜夜摸av| 成人午夜精品一区二区三区| 中文字幕的久久| 91婷婷韩国欧美一区二区| 亚洲欧美经典视频| 91国在线观看|