亚洲欧美第一页_禁久久精品乱码_粉嫩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精品国产综合久久福利| 欧美中文字幕一区| 欧美群妇大交群中文字幕| 欧美不卡视频一区| 成人欧美一区二区三区白人| 午夜精品久久久久久久99樱桃| 久久爱www久久做| 成人av中文字幕| 欧美日韩精品福利| 国产欧美一区二区精品性色超碰| 亚洲麻豆国产自偷在线| 麻豆精品新av中文字幕| gogo大胆日本视频一区| 在线成人av影院| 国产精品视频一二三区| 五月天激情综合| 处破女av一区二区| 在线不卡免费欧美| 国产精品福利一区二区三区| 日韩国产成人精品| av亚洲精华国产精华精华| 制服丝袜一区二区三区| 亚洲天堂成人在线观看| 极品少妇xxxx偷拍精品少妇| 欧美亚洲综合网| 国产日韩欧美不卡| 天天做天天摸天天爽国产一区 | 欧美成人精精品一区二区频| 国产精品久久久久久久久免费相片 | 免费成人在线播放| 97se亚洲国产综合自在线不卡 | 日韩美女久久久| 亚洲图片一区二区| 国产精品资源站在线| 欧美午夜视频网站| 国产日韩欧美a| 美女网站在线免费欧美精品| 91看片淫黄大片一级| 精品国产三级电影在线观看| 一区二区三区自拍| 成人性生交大片免费看中文| 日韩一区二区三区视频| 亚洲综合色网站| 国产丝袜美腿一区二区三区| 欧美国产日韩亚洲一区| 久久久国际精品| 亚洲123区在线观看| av男人天堂一区| 久久久久久久久久久黄色| 日韩激情一二三区| 欧洲精品在线观看| 国产精品国产馆在线真实露脸| 麻豆高清免费国产一区| 欧美久久久久中文字幕| 亚洲一区二区三区免费视频| 95精品视频在线| 中文字幕欧美国产| 国产69精品久久777的优势| 欧美大片国产精品| 日韩**一区毛片| 色婷婷av一区| 亚洲天堂中文字幕| 91视视频在线观看入口直接观看www | 精品成人私密视频| 久久精品国产亚洲一区二区三区| 欧美丰满美乳xxx高潮www| 夜色激情一区二区| 日韩伦理av电影| **网站欧美大片在线观看| 国产麻豆精品95视频| 欧美一级免费大片| 五月天视频一区| 欧美午夜影院一区| 亚洲主播在线观看| 在线观看一区不卡| 一个色综合av| 欧美中文字幕不卡| 亚洲第一成人在线| 欧美精选一区二区| 日本伊人色综合网| 精品日韩一区二区三区免费视频| 麻豆精品一二三| 久久影院电视剧免费观看| 国产乱码精品一区二区三区av | 国产在线精品一区二区| 久久综合一区二区| 国产mv日韩mv欧美| 国产精品福利av| 日本乱人伦aⅴ精品| 亚洲中国最大av网站| 欧美肥大bbwbbw高潮| 麻豆精品在线观看| 久久久久国色av免费看影院| 丁香啪啪综合成人亚洲小说| 中文字幕一区二区三区在线不卡| 91福利精品视频| 欧美天堂一区二区三区| 亚洲国产精品综合小说图片区| 欧美综合一区二区| 日本伊人色综合网| 精品理论电影在线观看| 成人中文字幕电影| 一区二区成人在线| 日韩免费电影一区| 粉嫩嫩av羞羞动漫久久久| 中文字幕综合网| 欧美精品国产精品| 国模冰冰炮一区二区| 国产精品色哟哟| 欧美性三三影院| 国产在线不卡一区| 一区二区在线观看不卡| 欧美一级爆毛片| 国产麻豆视频一区| 又紧又大又爽精品一区二区| 91精品国产手机| 成人午夜av在线| 香蕉久久一区二区不卡无毒影院 | 国产在线不卡一卡二卡三卡四卡| 国产精品理伦片| 欧美久久久久久久久久| 国产成人精品免费在线| 一二三四区精品视频| 久久午夜免费电影| 在线视频你懂得一区二区三区| 免费成人美女在线观看| 中文字幕在线观看一区| 欧美一区二区视频在线观看2022| 国产精品亚洲专一区二区三区| 91精品国产入口| 国产女同性恋一区二区| 欧美亚洲一区三区| 国模套图日韩精品一区二区| 一区二区三区四区激情| 337p日本欧洲亚洲大胆精品| 91黄色小视频| 国模一区二区三区白浆| 一区二区理论电影在线观看| 久久精品亚洲麻豆av一区二区| 欧美视频在线一区二区三区 | 国产精品人人做人人爽人人添| 欧美人xxxx| 99久久精品一区二区| 久99久精品视频免费观看| 亚洲乱码国产乱码精品精小说 | 国产麻豆精品95视频| 午夜视频久久久久久| 中文字幕一区免费在线观看| 精品久久久久久久人人人人传媒 | 全部av―极品视觉盛宴亚洲| 中文字幕亚洲视频| 久久久久久一二三区| 91精品国产综合久久国产大片| 91香蕉国产在线观看软件| 国产一区二区中文字幕| 免费成人结看片| 亚洲成人第一页| 最新不卡av在线| 国产欧美一区二区精品性| 日韩欧美一区电影| 欧美日韩视频专区在线播放| 91女厕偷拍女厕偷拍高清| 成人在线视频一区二区| 国产一区二区三区不卡在线观看| 日本aⅴ亚洲精品中文乱码| 一区二区免费在线播放| 亚洲情趣在线观看| 国产精品嫩草久久久久| 99久久综合国产精品| 洋洋av久久久久久久一区| 国产精品毛片高清在线完整版| 欧美zozo另类异族| 欧美成人女星排行榜| 日韩三级中文字幕| 欧美一区二区三区影视| 91精品国产综合久久久蜜臀粉嫩| 欧美影院一区二区| 91激情五月电影| 欧美性做爰猛烈叫床潮| 91久久国产综合久久| 一本久久综合亚洲鲁鲁五月天 | 亚洲男人的天堂在线观看| 中文字幕第一区第二区| 欧美韩日一区二区三区四区| 久久日一线二线三线suv| 亚洲精品一区二区在线观看| 欧美电影免费观看高清完整版在 | 久久国产精品第一页| 蜜臀久久99精品久久久久宅男 | 久久久精品欧美丰满| 久久久综合网站| 欧美激情在线免费观看| 国产精品乱人伦一区二区| 亚洲欧美在线aaa| 一区二区三区不卡视频| 日韩黄色在线观看| 精品在线免费观看| 国产suv精品一区二区883| 91亚洲精华国产精华精华液|