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

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

?? memlib.c

?? 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一区二区三区免费野_久草精品视频
成人网在线播放| 麻豆91在线看| 国产麻豆欧美日韩一区| 色婷婷亚洲综合| 精品国产免费人成在线观看| 亚洲乱码一区二区三区在线观看| 日韩精品一级中文字幕精品视频免费观看 | 国产欧美在线观看一区| 夜夜嗨av一区二区三区四季av| 久久99深爱久久99精品| 色噜噜夜夜夜综合网| 国产亚洲一二三区| 五月天一区二区| av成人免费在线观看| 精品少妇一区二区| 天天综合色天天综合色h| 激情综合亚洲精品| 欧美影片第一页| 国产亚洲精品久| 久久99这里只有精品| 欧美三区在线视频| 国产精品国产三级国产普通话三级| 久久久久久夜精品精品免费| 亚洲欧美电影一区二区| 国产精品欧美极品| 日本sm残虐另类| 色天天综合久久久久综合片| 久久丝袜美腿综合| 水野朝阳av一区二区三区| av福利精品导航| 久久人人97超碰com| 蜜臀a∨国产成人精品| 在线亚洲一区二区| 欧美国产综合色视频| 精品一区二区三区蜜桃| 日韩欧美一区在线| 丝袜诱惑亚洲看片| 91久久精品日日躁夜夜躁欧美| 国产视频视频一区| 国产美女主播视频一区| 日韩一级高清毛片| 日韩在线一区二区三区| 欧美视频精品在线观看| 国产精品视频免费| 懂色av一区二区三区蜜臀| 欧美va亚洲va| 久久草av在线| 精品成人佐山爱一区二区| 免费成人在线影院| 日韩一区二区三区在线视频| 婷婷六月综合亚洲| 在线综合+亚洲+欧美中文字幕| 午夜精品久久久久久| 欧美午夜精品久久久久久孕妇 | 成人免费视频app| 中文字幕久久午夜不卡| 国产成人精品影院| 久久久综合激的五月天| 国产一区二区三区免费播放| 久久久久9999亚洲精品| 国产不卡视频一区| 日本一区二区三区四区| 成人午夜免费av| 亚洲品质自拍视频| 色婷婷精品久久二区二区蜜臂av| 亚洲同性gay激情无套| 97精品视频在线观看自产线路二| 亚洲精品综合在线| 欧美日韩精品欧美日韩精品| 亚洲成人中文在线| 欧美福利电影网| 韩国一区二区在线观看| 欧美mv日韩mv国产网站| 国产精品一二三四区| 国产欧美一区二区精品性| 成人久久久精品乱码一区二区三区| 中文字幕av一区 二区| a美女胸又www黄视频久久| 樱桃视频在线观看一区| 欧美久久久久久久久久| 蜜臀av国产精品久久久久| 精品国偷自产国产一区| 国产黑丝在线一区二区三区| 亚洲色图视频网| 在线观看视频91| 日日夜夜免费精品| 国产午夜精品一区二区三区四区| www.欧美色图| 亚洲国产视频a| 日韩免费视频线观看| bt欧美亚洲午夜电影天堂| 亚洲国产成人tv| 日韩女同互慰一区二区| 久久99国产精品麻豆| 亚洲女人****多毛耸耸8| 日本精品视频一区二区| 青椒成人免费视频| 欧美国产丝袜视频| 欧美日韩国产综合一区二区 | 91丨porny丨在线| 三级一区在线视频先锋 | 一区精品在线播放| 欧美日韩一区视频| 国产不卡免费视频| 日韩经典中文字幕一区| 中文字幕一区在线| 日韩三级免费观看| 一本色道久久综合精品竹菊| 国产麻豆精品视频| 天天色图综合网| 中文字幕制服丝袜成人av| 欧美一区日韩一区| 91蝌蚪porny| 国产一区二区精品久久91| 亚洲国产成人91porn| 日本一区二区三区免费乱视频| 69p69国产精品| 色播五月激情综合网| 国产福利一区二区| 奇米色一区二区三区四区| 一区二区三区四区不卡视频| 国产精品午夜在线| 欧美大片国产精品| 欧美日本在线播放| 日本韩国精品在线| 成人久久视频在线观看| 国产一区二区三区在线看麻豆| 亚洲成人中文在线| 亚洲乱码中文字幕| 国产精品国产馆在线真实露脸| 久久无码av三级| 欧美一级电影网站| 欧美日韩国产综合久久| 一本大道久久精品懂色aⅴ| 国产99精品视频| 国产一区二区成人久久免费影院| 日韩国产欧美在线视频| 亚洲一区二区高清| 亚洲乱码国产乱码精品精小说| 国产精品久久精品日日| 国产视频一区不卡| 久久久91精品国产一区二区精品| 精品日产卡一卡二卡麻豆| 欧美高清视频在线高清观看mv色露露十八| 色偷偷久久一区二区三区| av电影天堂一区二区在线| 成人精品国产一区二区4080| 国产精品亚洲人在线观看| 国产乱码精品一品二品| 国内精品伊人久久久久av影院| 欧美aaa在线| 久久精品国产成人一区二区三区| 日本va欧美va精品| 奇米在线7777在线精品| 蜜桃久久久久久| 九九**精品视频免费播放| 麻豆成人免费电影| 狠狠色丁香久久婷婷综| 国产精品亚洲专一区二区三区| 国产成人在线视频播放| 国产成人精品1024| 粉嫩嫩av羞羞动漫久久久| 丁香网亚洲国际| av在线播放成人| 色综合夜色一区| 欧洲av一区二区嗯嗯嗯啊| 欧美日韩国产综合一区二区三区| 欧美男女性生活在线直播观看| 91精品国产一区二区| 欧美成人猛片aaaaaaa| 久久美女高清视频| 国产精品国产自产拍高清av| 亚洲人被黑人高潮完整版| 亚洲制服丝袜在线| 日韩高清欧美激情| 国产一区在线观看视频| 成人在线视频首页| 色成年激情久久综合| 制服丝袜亚洲精品中文字幕| 精品国产一区二区国模嫣然| 久久精品人人做| 最近日韩中文字幕| 亚洲成人免费在线| 久久不见久久见免费视频1| 国产99久久久国产精品潘金网站| 成人h版在线观看| 欧美在线短视频| 日韩一区二区三区四区五区六区 | 91老师国产黑色丝袜在线| 91国模大尺度私拍在线视频| 91精品国产综合久久婷婷香蕉| 久久影院电视剧免费观看| 国产精品福利av| 日韩和欧美一区二区| 国产电影一区在线| 91福利国产成人精品照片| 欧美大片一区二区| 中文字幕中文字幕在线一区 | 视频一区免费在线观看| 国产酒店精品激情|