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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? memlib.c

?? vxworks操作系統(tǒng)的源代碼
?? 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);    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
性做久久久久久| 国产一区二区伦理片| 国产日本亚洲高清| 精品国精品国产尤物美女| 欧美精品国产精品| 欧美日韩久久久| 777色狠狠一区二区三区| 欧美日韩在线播| 在线观看国产精品网站| 欧美日韩日日骚| 欧美日韩亚洲不卡| 91精品国产高清一区二区三区蜜臀| 在线不卡欧美精品一区二区三区| 欧美高清视频一二三区| 精品99999| 欧美激情一区二区| 国产精品国产三级国产普通话99| 最新久久zyz资源站| 亚洲最大成人综合| 奇米一区二区三区| 国产一区二区三区最好精华液| 国产精品一二三四| 99麻豆久久久国产精品免费优播| 日本精品免费观看高清观看| 欧美日韩黄色影视| 久久久精品一品道一区| 中文字幕在线观看不卡| 亚洲午夜免费视频| 久久99国产精品久久| 成人午夜免费av| 欧美乱妇15p| 国产目拍亚洲精品99久久精品| 亚洲精品国产精品乱码不99| 午夜日韩在线观看| 国产**成人网毛片九色| 欧美三级乱人伦电影| 久久综合色之久久综合| 亚洲人妖av一区二区| 麻豆精品久久久| 91视频www| 欧美精品一区二区三区很污很色的 | 亚洲综合999| 国产一区二区三区在线观看免费视频 | 亚洲a一区二区| 国产98色在线|日韩| 欧美日韩一区二区电影| 久久九九影视网| 首页国产欧美久久| 色综合婷婷久久| 久久精品亚洲国产奇米99| 五月婷婷欧美视频| av在线播放一区二区三区| 精品日韩av一区二区| 午夜精品福利一区二区蜜股av | 亚洲精品国产一区二区精华液| 黄网站免费久久| 欧美一区永久视频免费观看| 亚洲天堂精品视频| 成人午夜伦理影院| 久久精品网站免费观看| 久久精工是国产品牌吗| 欧美另类久久久品| 亚洲国产wwwccc36天堂| 色先锋久久av资源部| 欧美国产一区视频在线观看| 国产乱子伦视频一区二区三区| 日韩一区二区三免费高清| 亚洲一区二区三区中文字幕在线| jlzzjlzz欧美大全| 国产精品无码永久免费888| 麻豆成人免费电影| 日韩精品在线一区二区| 老色鬼精品视频在线观看播放| 欧美精品久久99| 蜜臀a∨国产成人精品| 欧美剧在线免费观看网站| 亚洲成av人片在www色猫咪| 欧美性欧美巨大黑白大战| 一区二区三区在线免费播放 | 国产大陆精品国产| 久久久久国产精品免费免费搜索| 理论片日本一区| 国产欧美一区二区精品性色超碰| 国产在线乱码一区二区三区| 久久久久国产一区二区三区四区 | 国产精品一区免费视频| 中文无字幕一区二区三区| 国产.欧美.日韩| 亚洲欧美一区二区三区极速播放 | 99精品桃花视频在线观看| 国产精品久久久久影院亚瑟| 成人av资源在线观看| 亚洲免费在线视频一区 二区| 欧美亚洲高清一区| 美女诱惑一区二区| 国产欧美一区二区精品性 | 丝袜诱惑亚洲看片| 欧美电影免费提供在线观看| 国产大陆a不卡| 一区二区三区在线播| 91精品国产91综合久久蜜臀| 精品一区二区免费在线观看| 国产精品久久久久久久久晋中 | 夜夜精品浪潮av一区二区三区| 欧美一卡2卡三卡4卡5免费| 国产精品一区在线| 亚洲国产精品综合小说图片区| 日韩限制级电影在线观看| 国产精品一区二区久激情瑜伽 | 亚洲人吸女人奶水| 91精品欧美久久久久久动漫| 国产精品69毛片高清亚洲| 一区二区高清在线| 精品对白一区国产伦| 91蜜桃网址入口| 久久精品国产精品青草| 一区二区三区日本| 久久在线观看免费| 欧美年轻男男videosbes| 国产不卡视频一区| 另类人妖一区二区av| 一区二区在线观看视频| 久久婷婷国产综合国色天香| 精品视频色一区| 成人午夜免费电影| 国产综合久久久久影院| 亚洲综合av网| 亚洲视频 欧洲视频| 欧美r级在线观看| 欧美精品欧美精品系列| 91九色02白丝porn| av中文字幕一区| 成人深夜在线观看| 韩国女主播成人在线| 日韩精品一二三| 亚洲不卡一区二区三区| 亚洲欧美日韩在线| 国产精品水嫩水嫩| 久久久精品黄色| 久久久久久久久免费| 日韩久久久久久| 欧美精品xxxxbbbb| 欧美日韩综合不卡| 在线视频你懂得一区| 91麻豆精品在线观看| 91在线视频在线| 91视频在线观看| 一本到高清视频免费精品| 91视视频在线直接观看在线看网页在线看 | 色先锋久久av资源部| 色综合欧美在线| 在线精品视频一区二区三四| 91在线视频在线| 在线观看欧美黄色| 欧美伦理视频网站| 欧美一区二区三区视频在线观看 | 欧美影院一区二区| 欧美日韩高清一区二区不卡 | 久久久国际精品| 国产亚洲一区二区三区| 国产女主播一区| 亚洲精品国产一区二区精华液| 亚洲一区二区三区在线播放| 亚洲高清免费在线| 久久99精品一区二区三区| 国产一区在线观看视频| 懂色av一区二区夜夜嗨| 色哟哟日韩精品| 欧美日韩国产精选| 欧美精品一区二区在线观看| 国产欧美一区二区精品性色| 亚洲精品日日夜夜| 日韩av二区在线播放| 国产在线精品免费| av电影天堂一区二区在线| 欧美日韩久久一区二区| 26uuu亚洲婷婷狠狠天堂| 亚洲国产精品av| 亚洲www啪成人一区二区麻豆| 久久av中文字幕片| 99精品热视频| 制服丝袜成人动漫| 国产精品午夜久久| 午夜伦理一区二区| 国产成人在线看| 91超碰这里只有精品国产| 久久久99免费| 亚洲国产成人av网| 成人网在线播放| 欧美一级精品大片| 亚洲精选免费视频| 激情久久久久久久久久久久久久久久| 菠萝蜜视频在线观看一区| 在线播放视频一区| 国产精品高潮呻吟| 久久精品国产99| 欧美日韩精品福利| 亚洲天堂成人在线观看| 国产一区二区女| 在线综合亚洲欧美在线视频|