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

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

?? memlib.c

?? vxworks操作系統Intel體系結構下內核源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
			          MEM_BLOCK_CHECK;	memLibInstalled = TRUE;	}    return ((memLibInstalled) ? OK : ERROR);    }/********************************************************************************* memInit - initialize the system memory partition** This routine initializes the system partition free list with the* specified memory block.  It must be called exactly once before invoking any* other routine in memLib.  It is called by kernelInit() in usrRoot()* in usrConfig.c.** RETURNS: OK or ERROR.** NOMANUAL*/STATUS memInit     (    char *pPool,        /* pointer to memory block */    unsigned poolSize   /* block size in bytes */    )    {    memLibInit ();		/* attach memLib functions to memPartLib */    return (memPartLibInit (pPool, poolSize));    }/********************************************************************************* memPartOptionsSet - set the debug options for a memory partition** This routine sets the debug options for a specified 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 error status is returned.  There are four error-handling* options that can be individually selected:* * .iP "MEM_ALLOC_ERROR_LOG_FLAG" 8* Log a message when there is an error in allocating memory.* .iP "MEM_ALLOC_ERROR_SUSPEND_FLAG"* Suspend the task when there is an error in allocating memory (unless* the task was spawned with the VX_UNBREAKABLE option, in which case it* cannot be suspended).* .iP "MEM_BLOCK_ERROR_LOG_FLAG"* Log a message when there is an error in freeing memory.* .iP "MEM_BLOCK_ERROR_SUSPEND_FLAG"* Suspend the task when there is an error in freeing memory (unless* the task was spawned with the VX_UNBREAKABLE option, in which case it* cannot be suspended).* .LP* * These options are discussed in detail in the library manual entry for* memLib.* * RETURNS: OK or ERROR.** ERRNO: S_smObjLib_NOT_INITIALIZED** SEE ALSO: smMemLib*/STATUS memPartOptionsSet     (    PART_ID  	partId,    /* partition to set option for */    unsigned  	options    /* memory management options */    )    {    if ((!memLibInstalled) && (memLibInit () != OK))	/* initialize package */	return (ERROR);    if (ID_IS_SHARED (partId))  /* partition is shared? */	{	if (smMemPartOptionsSetRtn == NULL)	    {	    errno = S_smObjLib_NOT_INITIALIZED;	    return (ERROR);	    }        return ((*smMemPartOptionsSetRtn)(SM_OBJ_ID_TO_ADRS (partId), options));	}    /* partition is local */    if (OBJ_VERIFY (partId, memPartClassId) != OK)	return (ERROR);    semTake (&partId->sem, WAIT_FOREVER);    /*     * Need to convert old-style options to new-style options     */    if (options & (MEM_ALLOC_ERROR_MASK | MEM_BLOCK_ERROR_MASK))	{	if (options & MEM_ALLOC_ERROR_LOG_MSG)	   options |= MEM_ALLOC_ERROR_LOG_FLAG;	if (options & MEM_ALLOC_ERROR_LOG_AND_SUSPEND)	    options |= (MEM_ALLOC_ERROR_LOG_FLAG |			MEM_ALLOC_ERROR_SUSPEND_FLAG);	if (options & MEM_BLOCK_ERROR_LOG_MSG)	   options |= MEM_BLOCK_ERROR_LOG_FLAG;	if (options & MEM_BLOCK_ERROR_LOG_AND_SUSPEND)	    options |= (MEM_BLOCK_ERROR_LOG_FLAG |			MEM_BLOCK_ERROR_SUSPEND_FLAG);	}    /*     * If either of the MEM_BLOCK options have been set, also set     * MEM_BLOCK_CHECK.     */    if (options & (MEM_BLOCK_ERROR_LOG_FLAG | MEM_BLOCK_ERROR_SUSPEND_FLAG))        options |= MEM_BLOCK_CHECK;        partId->options = options;    semGive (&partId->sem);    return (OK);    }/********************************************************************************* memalign - allocate aligned memory ** This routine allocates a buffer of size <size> from the system memory * partition.  Additionally, it insures that the allocated buffer begins * on a memory address evenly divisible by the specified alignment parameter.* The alignment parameter must be a power of 2.** RETURNS:* A pointer to the newly allocated block, or NULL if the buffer could not be* allocated.*/void *memalign     (    unsigned alignment,		/* boundary to align to (power of 2) */    unsigned size               /* number of bytes to allocate */    )    {    return (memPartAlignedAlloc (memSysPartId, size, alignment));    }/********************************************************************************* valloc - allocate memory on a page boundary ** This routine allocates a buffer of <size> bytes from the system memory* partition.  Additionally, it insures that the allocated buffer* begins on a page boundary.  Page sizes are architecture-dependent.** RETURNS:* A pointer to the newly allocated block, or NULL if the buffer could not be* allocated or the memory management unit (MMU) support library has not been* initialized.** ERRNO: S_memLib_PAGE_SIZE_UNAVAILABLE*/void * valloc     (    unsigned size	/* number of bytes to allocate */    )    {    int pageSize = VM_PAGE_SIZE_GET();    if (pageSize == ERROR)	{	errno = S_memLib_PAGE_SIZE_UNAVAILABLE;	return (NULL);	}    return (memalign (pageSize, size));    }/********************************************************************************* memPartRealloc - reallocate a block of memory in a specified partition** This routine changes the size of a specified block of memory and returns a* pointer to the new block.  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.** If <pBlock> is NULL, this call is equivalent to memPartAlloc().** RETURNS:* A pointer to the new block of memory, or NULL if the call fails.** ERRNO: S_smObjLib_NOT_INITIALIZED** SEE ALSO: smMemLib*/void *memPartRealloc     (    PART_ID partId,             /* partition ID */    char *pBlock,               /* block to be reallocated */    unsigned nBytes             /* new block size in bytes */    )    {    FAST BLOCK_HDR *pHdr = BLOCK_TO_HDR (pBlock);    FAST BLOCK_HDR *pNextHdr;    FAST unsigned nWords;    void *pNewBlock;    if (ID_IS_SHARED (partId))  /* partition is shared? */	{	if (smMemPartReallocRtn == NULL)	    {	    errno = S_smObjLib_NOT_INITIALIZED;	    return (NULL);	    }        return ((void *) (*smMemPartReallocRtn) (SM_OBJ_ID_TO_ADRS (partId), 						 pBlock, nBytes));	}    /* partition is local */    if (OBJ_VERIFY (partId, memPartClassId) != OK)	return (NULL);    /* Call memPartAlloc() if user passed us a NULL pointer */    if (pBlock == NULL)        return (memPartAlloc (partId, (unsigned) nBytes));       /* Call memPartFree() if nBytes=0 (SPR 5858) */    if (nBytes == 0)	{	(void) memPartFree (memSysPartId, pBlock);	return (NULL);	}    /* get exclusive access to the partition */    semTake (&partId->sem, WAIT_FOREVER);    /* get actual new size; round-up, add overhead, check for minimum */    nWords = (MEM_ROUND_UP (nBytes) + sizeof (BLOCK_HDR)) >> 1;    if (nWords < partId->minBlockWords)	nWords = partId->minBlockWords;    /* optional check for validity of block */    if ((partId->options & MEM_BLOCK_CHECK) &&        !memPartBlockIsValid (partId, pHdr, FALSE))	{	semGive (&partId->sem);			/* release mutual exclusion */	memPartBlockError (partId, pBlock, "memPartRealloc");	return (NULL);	}    /* test if we are trying to increase size of block */    if (nWords > pHdr->nWords)	{	/* increase size of block -	 * check if next block is free and is big enough to satisfy request*/	pNextHdr = NEXT_HDR (pHdr);	if (!pNextHdr->free || ((pHdr->nWords + pNextHdr->nWords) < nWords))	    {	    /* can't use adjacent free block -	     * allocate an entirely new block and copy data */	    semGive (&partId->sem);	    if ((pNewBlock = memPartAlloc (partId, nBytes)) == NULL)		return (NULL);	    bcopy (pBlock, (char *) pNewBlock,		   (int) (2 * pHdr->nWords - sizeof (BLOCK_HDR)));	    (void) memPartFree (partId, pBlock);	    return (pNewBlock);		/* RETURN, don't fall through */	    }	else	    {	    /* append next block to this one -	     *  - delete next block from freelist,	     *  - add its size to this block,	     *  - update allocation statistics,	     *  - fix prev info in new "next" block header */	    dllRemove (&partId->freeList, HDR_TO_NODE (pNextHdr));	    pHdr->nWords += pNextHdr->nWords;			/* fix size */#ifdef WV_INSTRUMENTATION	    /*	     * The following call to instrumentation will log an a greater	     * than needed nBytesPlusHeaderAlign. This is because, at this	     * point, nBytesPlusHeaderAlign includes the total size of the	     * newly freed memory block. The unused portion will be returned	     * to the free list (see memBlockSplit() just below, at which	     * time the excess will be logged as an EVENT_MEMFREE	     */	    EVT_OBJ_4 (OBJ, partId, memPartClassId, EVENT_MEMREALLOC,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费高清视频精品| 欧美日韩国产片| 欧美日韩你懂得| 国产欧美日产一区| 日韩国产欧美一区二区三区| 成人黄色网址在线观看| 日韩三级视频中文字幕| 一区二区高清在线| 粉嫩一区二区三区在线看| 555www色欧美视频| 夜夜嗨av一区二区三区中文字幕| 国产乱对白刺激视频不卡| 欧美久久一二区| 一区二区三区在线视频播放| 国产99久久久国产精品免费看| 91精品婷婷国产综合久久性色 | av电影天堂一区二区在线| 日韩一区二区精品葵司在线| 日韩成人av影视| 欧日韩精品视频| 亚洲欧美在线高清| 国产一区二区三区高清播放| 欧美一级黄色大片| 日日噜噜夜夜狠狠视频欧美人| 欧美亚洲一区二区三区四区| 亚洲人成精品久久久久| 成人小视频在线| 国产欧美一区二区精品秋霞影院 | 国产精品18久久久久久久久| 日韩一区二区三区在线| 奇米影视在线99精品| 欧美丰满少妇xxxxx高潮对白| 亚洲最新视频在线观看| 91丨porny丨国产| 亚洲视频1区2区| 一本久久综合亚洲鲁鲁五月天 | 日韩电影在线看| 在线不卡的av| 久久99日本精品| 精品国产髙清在线看国产毛片| 捆绑调教一区二区三区| 精品国产免费人成电影在线观看四季 | 欧美视频在线不卡| 亚洲国产wwwccc36天堂| 91精品久久久久久蜜臀| 日本不卡一区二区三区| 日韩精品中文字幕在线一区| 紧缚捆绑精品一区二区| 国产亚洲精品免费| 99久久精品国产毛片| 亚洲黄色免费网站| 91精品蜜臀在线一区尤物| 精品一区精品二区高清| 国产日本欧美一区二区| 91啦中文在线观看| 婷婷综合另类小说色区| 欧美不卡一区二区三区四区| 国产精品一区二区x88av| 日韩毛片精品高清免费| 欧美亚洲国产一区二区三区 | 国产成人av一区二区三区在线| 国产精品网站一区| 91高清在线观看| 欧美a级一区二区| 国产精品免费久久久久| 在线观看视频欧美| 久久精品国产一区二区三| 亚洲国产精品高清| 8x福利精品第一导航| 国产一区二区三区免费在线观看 | 精品国产欧美一区二区| 99精品欧美一区二区蜜桃免费 | 日韩精品欧美成人高清一区二区| 日韩午夜在线观看视频| a亚洲天堂av| 美女精品一区二区| 亚洲人成精品久久久久| 欧美精品一区二区三区很污很色的| 成人av中文字幕| 久久精品国产久精国产| 亚洲人成小说网站色在线| 欧美成人a在线| 欧美性受极品xxxx喷水| 国产99久久久国产精品潘金| 丝袜美腿亚洲综合| 亚洲少妇30p| 国产亚洲精品福利| 欧美高清视频www夜色资源网| 成人午夜在线播放| 久久精品国产**网站演员| 亚洲综合无码一区二区| 国产亚洲一二三区| 91精品一区二区三区在线观看| 一本大道久久a久久精品综合| 国产美女av一区二区三区| 婷婷夜色潮精品综合在线| 亚洲日本中文字幕区| 久久精品视频免费观看| 日韩欧美久久久| 欧美日韩一级视频| 97久久人人超碰| 成人的网站免费观看| 黑人巨大精品欧美黑白配亚洲| 亚洲欧美日韩国产手机在线| 91精品免费观看| 美女网站一区二区| 国产精品入口麻豆原神| 欧美精品视频www在线观看| 99视频在线精品| 成人妖精视频yjsp地址| 紧缚奴在线一区二区三区| 蜜桃久久久久久久| 日韩精品1区2区3区| 亚洲成人黄色小说| 亚洲妇女屁股眼交7| 亚洲va中文字幕| 天天综合网天天综合色| 午夜精品福利一区二区三区av| 亚洲图片欧美一区| 午夜激情一区二区| 视频在线观看一区| 免费看精品久久片| 激情小说欧美图片| 国产黄色成人av| 成人黄色综合网站| 色狠狠桃花综合| 欧美三级电影网| 欧美一级精品在线| 国产无遮挡一区二区三区毛片日本| 久久久久国产精品麻豆| 国产午夜精品在线观看| 国产精品理伦片| 亚洲欧美另类图片小说| 亚洲成人777| 久久99国产精品尤物| 成人av在线资源网站| 91福利国产精品| 日韩欧美亚洲一区二区| 国产欧美日韩三区| 一区二区三区欧美| 日韩高清不卡一区二区三区| 蓝色福利精品导航| 国产成都精品91一区二区三| 成人app下载| 欧美老肥妇做.爰bbww| 欧美成人r级一区二区三区| 中文字幕高清不卡| 一区二区三区鲁丝不卡| 蜜臀va亚洲va欧美va天堂| 丁香另类激情小说| 欧美久久久一区| 欧美高清在线精品一区| 亚洲高清免费观看高清完整版在线观看 | 香蕉成人伊视频在线观看| 精品夜夜嗨av一区二区三区| 91视频在线观看免费| 91精选在线观看| 中文字幕亚洲在| 视频在线观看国产精品| 福利一区在线观看| 欧美日韩激情一区二区| 国产欧美精品一区二区三区四区| 一区二区三区四区五区视频在线观看| 日一区二区三区| 成人激情电影免费在线观看| 91精品国产91久久综合桃花| 亚洲欧洲美洲综合色网| 蜜臀久久99精品久久久久久9| 成人国产精品免费网站| 日韩色视频在线观看| 夜色激情一区二区| 成人精品免费看| 日韩精品在线网站| 亚洲国产精品麻豆| av成人老司机| 国产欧美一区二区三区鸳鸯浴 | 2021中文字幕一区亚洲| 夜色激情一区二区| 不卡一区在线观看| 久久久亚洲精华液精华液精华液| 亚洲综合一区在线| 一本大道av伊人久久综合| 国产精品视频看| 国产一区二区精品久久99| 51久久夜色精品国产麻豆| 亚洲已满18点击进入久久| 99精品欧美一区二区三区小说 | 欧美精品一区二区三区很污很色的| 亚洲成人av一区二区三区| 91女厕偷拍女厕偷拍高清| 精品一区二区三区免费视频| 中文字幕中文字幕在线一区| 中日韩免费视频中文字幕| 中文字幕一区不卡| 精品一区中文字幕| 中文字幕制服丝袜一区二区三区 | 欧美性生活影院| 一区二区三区不卡视频| 色综合久久九月婷婷色综合| 中文字幕av在线一区二区三区|