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

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

?? memshow.c

?? VxWorks BSP框架源代碼包含頭文件和驅動
?? C
字號:
/* memShow.c - memory show routines *//* Copyright 1984-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01t,06oct01,tam  fixed sign and formatting01s,05oct01,gls  moved printf in memPartInfoGet() to after semGive (SPR #20102)01r,26sep01,jws  move vxMP smMemPartShowRtn ptr to funcBind.c (SPR36055)01q,17mar99,jdi  doc: updated w/ info about proj facility (SPR 25727).01p,21feb99,jdi  doc: listed errnos.01o,17dec97,yp   (SPR #20054) memPartInfoGet now releases partId semaphore if 		 memPartBlockIsValid fails01n,10oct95,jdi  doc: added .tG Shell to SEE ALSOs;		 fixed typo in memPartInfoGet().01m,28mar95,ms	 memPartAvailable is now static, and doesn't call semTake().01l,18jan95,jdi  doc cleanup for memPartInfoGet().01k,01dec93,jag  added function memPartInfoGet.01j,20jan94,jmm  memPartAvailable() now gives the semaphore on error (spr 2908)01i,13sep93,jmm  fixed calll to memPartBlockIsValid() from memPartAvailable ()01h,30aug93,jmm  added memPartAvailable, changed memPartShow to use it01g,02feb93,jdi  doctweak (INCLUDE_SHOW_RTNS to ...ROUTINES).01f,22jan93,jdi  documentation cleanup for 5.1.01e,13nov92,dnw  added include of smObjLib.h01d,02oct92,jdi  documentation cleanup.01c,29jul92,pme  added NULL function pointer check for smObj routines.                 moved OBJ_VERIFY before first printf in memPartShow.01b,19jul92,pme  added shared memory management support.01a,01jul92,jcf  extracted from memLib.c.*//*DESCRIPTIONThis library contains memory partition information display routines.To use this facility, it must first be installed using memShowInit(),which is called automatically when the memory partition show facilityis configured into VxWorks using either of the following methods:.iPIf you use the configuration header files, defineINCLUDE_SHOW_ROUTINES in config.h..iPIf you use the Tornado project facility, select INCLUDE_MEM_SHOW..LPSEE ALSO: memLib, memPartLib,.pG "Target Shell,"windsh,.tG "Shell"*/#include "vxWorks.h"#include "semLib.h"#include "dllLib.h"#include "stdlib.h"#include "stdio.h"#include "string.h"#include "errno.h"#include "smObjLib.h"#include "private/memPartLibP.h"#include "private/smMemLibP.h"/* globals *//* forward declarations */static size_t memPartAvailable (PART_ID partId, size_t * largestBlock,				BOOL printEach); /******************************************************************************** memShowInit - initialize the memory partition show facility** This routine links the memory partition show facility into the VxWorks system.* These routines are included automatically when this show facility is* configured into VxWorks using either of the following methods:* .iP* If you use the configuration header files, define* INCLUDE_SHOW_ROUTINES in config.h.* .iP* If you use the Tornado project facility, select INCLUDE_MEM_SHOW.** RETURNS: N/A*/void memShowInit (void)    {    classShowConnect (memPartClassId, (FUNCPTR)memPartShow);    }/********************************************************************************* memShow - show system memory partition blocks and statistics** This routine displays statistics about the available and allocated memory* in the system memory partition.  It shows the number of bytes, the number* of blocks, and the average block size in both free and allocated memory,* and also the maximum block size of free memory.  It also shows the number* of blocks currently allocated and the average allocated block size.** In addition, if <type> is 1, the routine displays a list of all the blocks in* the free list of the system partition.** EXAMPLE* .CS*     -> memShow 1**     FREE LIST:*       num     addr      size*       --- ---------- ----------*         1   0x3fee18         16*         2   0x3b1434         20*         3    0x4d188    2909400* *     SUMMARY:*      status   bytes    blocks   avg block  max block*      ------ --------- -------- ---------- ----------*     current*        free   2909436        3     969812   2909400*       alloc    969060    16102         60        -*     cumulative*       alloc   1143340    16365         69        -* .CE** RETURNS: N/A** SEE ALSO: memPartShow(),* .pG "Target Shell,"* windsh,* .tG "Shell"*/void memShow     (    int type 	/* 1 = list all blocks in the free list */    )    {    memPartShow (memSysPartId, type);    }/********************************************************************************* memPartShow - show partition blocks and statistics** This routine displays statistics about the available and allocated memory* in a specified memory partition.  It shows the number of bytes, the number* of blocks, and the average block size in both free and allocated memory,* and also the maximum block size of free memory.  It also shows the number* of blocks currently allocated and the average allocated block size.** In addition, if <type> is 1, the routine displays a list of all the blocks* in the free list of the specified partition.** RETURNS: OK or ERROR.** ERRNO: S_smObjLib_NOT_INITIALIZED** SEE ALSO: memShow(),* .pG "Target Shell,"* windsh,* .tG "Shell"*/STATUS memPartShow     (    PART_ID partId,	/* partition ID                          */    int		 type		/* 0 = statistics, 1 = statistics & list */    )    {    int		numBlocks;    unsigned	totalBytes = 0;    unsigned	biggestWords = 0;    if (partId == NULL)	{	printf ("No partId specified.\n");	return (ERROR);	}    if (ID_IS_SHARED (partId))  /* partition is shared? */	{	if (smMemPartShowRtn == NULL)	    {	    errno = S_smObjLib_NOT_INITIALIZED;	    return (ERROR);	    }        return ((STATUS) (*smMemPartShowRtn)(SM_OBJ_ID_TO_ADRS (partId), type));	}    /* partition is local */    if (OBJ_VERIFY (partId, memPartClassId) != OK)	return (ERROR);    /* print out list header if we are going to print list */    if (type == 1)	{	printf ("\nFREE LIST:\n");	printf ("   num    addr       size\n");	printf ("  ---- ---------- ----------\n");	}    semTake (&partId->sem, WAIT_FOREVER);    if ((totalBytes = memPartAvailable (partId, &biggestWords, type)) == ERROR)	{	semGive (&partId->sem);        return (ERROR);	}    else        biggestWords /= 2;	/* memPartAvailable returns bytes, not words */        if (type == 1)	printf ("\n\n");    numBlocks = dllCount (&partId->freeList);    if (type == 1)	printf ("SUMMARY:\n");    printf (" status    bytes     blocks   avg block  max block\n");    printf (" ------ ---------- --------- ---------- ----------\n");    printf ("current\n");    if (numBlocks != 0)	printf ("   free %10u %9u %10u %10u\n", totalBytes, numBlocks,		totalBytes / numBlocks, 2 * biggestWords);    else	printf ("   no free blocks\n");    if (partId->curBlocksAllocated != 0)	printf ("  alloc %10u %9u %10u          -\n",		2 * partId->curWordsAllocated, partId->curBlocksAllocated,	        (2 * partId->curWordsAllocated) / partId->curBlocksAllocated);    else	printf ("   no allocated blocks\n");    printf ("cumulative\n");    if (partId->cumBlocksAllocated != 0)	printf ("  alloc %10u %9u %10u          -\n",		2 * partId->cumWordsAllocated, partId->cumBlocksAllocated,		(2 * partId->cumWordsAllocated) / partId->cumBlocksAllocated);    else	printf ("   no allocated blocks\n");    semGive (&partId->sem);    return (OK);    }/********************************************************************************* memPartAvailable - return the amount of available memory in the partition** This routine returns the amount of available memory in a specified partition.* Additionally, if largestBlock is set to non-NULL, the value it points to* is set to the size in bytes of the largest available block.* * If printEach is TRUE, each block's address and size is printed.* * RETURNS: Number of bytes of remaining memory, or ERROR.** NOMANUAL*/static size_t memPartAvailable     (    PART_ID 	 partId, 	/* partition ID                              */    size_t *     largestBlock,	/* returns largest block of memory in bytes  */    BOOL	 printEach	/* TRUE if each block to be printed          */    )    {    BLOCK_HDR *	 pHdr;    DL_NODE *	 pNode;    size_t	 totalBytes   = 0;    size_t	 biggestWords = 0;    int		 ix           = 1;    if (ID_IS_SHARED (partId))  /* partition is shared? */	{	if (smMemPartShowRtn == NULL)	    {	    errno = S_smObjLib_NOT_INITIALIZED;	    return (ERROR);	    }	/* shared partitions not supported yet */	        return (ERROR);	}    /* partition is local */    if (OBJ_VERIFY (partId, memPartClassId) != OK)	return (ERROR);    for (pNode = DLL_FIRST (&partId->freeList);	 pNode != NULL;	 pNode = DLL_NEXT (pNode))	{	pHdr = NODE_TO_HDR (pNode);	/* check consistency and delete if not */	if (!memPartBlockIsValid (partId, pHdr, pHdr->free))	    {	    printf ("  invalid block at %#x deleted\n", (UINT) pHdr);	    dllRemove (&partId->freeList, HDR_TO_NODE (pHdr));	    return (ERROR);	    }	else	    {	    totalBytes += 2 * pHdr->nWords;	    if (pHdr->nWords > biggestWords)		biggestWords = pHdr->nWords;	    if (printEach)		printf ("  %4d 0x%08x %10u\n", ix++, (UINT) pHdr,			(UINT) 2 * pHdr->nWords);	    }	}    if (largestBlock != NULL)        *largestBlock = biggestWords * 2;    return (totalBytes);    }/********************************************************************************* memPartInfoGet - get partition information** This routine takes a partition ID and a pointer to a MEM_PART_STATS structure.* All the parameters of the structure are filled in with the current partition* information.** RETURNS: OK if the structure has valid data, otherwise ERROR.** SEE ALSO: memShow()*/STATUS memPartInfoGet     (    PART_ID 		partId,		/* partition ID    	     */    MEM_PART_STATS    * ppartStats      /* partition stats structure */    )    {    BLOCK_HDR    * pHdr;    DL_NODE      * pNode;    if (partId == NULL || ppartStats == NULL)	{	return (ERROR);	}    if (ID_IS_SHARED (partId))  /* partition is shared? */	{	return (ERROR);         /* No support for Shared Partitions */	}    /* partition is local */    if (OBJ_VERIFY (partId, memPartClassId) != OK)	return (ERROR);    ppartStats->numBytesFree     = 0;    ppartStats->numBlocksFree    = 0;    ppartStats->maxBlockSizeFree = 0;    ppartStats->numBytesAlloc    = 0;    ppartStats->numBlocksAlloc   = 0;    semTake (&partId->sem, WAIT_FOREVER);    /* Get free memory information */    for (pNode = DLL_FIRST (&partId->freeList);	 pNode != NULL;	 pNode = DLL_NEXT (pNode))	{	pHdr = NODE_TO_HDR (pNode);	/* check consistency and delete if not */	if (!memPartBlockIsValid (partId, pHdr, pHdr->free))	    {	    dllRemove (&partId->freeList, HDR_TO_NODE (pHdr));    	    semGive (&partId->sem);	    printf ("  invalid block at %#x deleted\n", (UINT) pHdr);	    return (ERROR);	    }	else	    {	    /* All byte counts are in words, the conversion is done later */	    ppartStats->numBytesFree +=  pHdr->nWords;	    ppartStats->numBlocksFree++;	    if (ppartStats->maxBlockSizeFree < pHdr->nWords)		ppartStats->maxBlockSizeFree = pHdr->nWords;	    }	}    /* Get allocated memory information */    if (partId->curBlocksAllocated != 0)	{	ppartStats->numBytesAlloc  = partId->curWordsAllocated; 	ppartStats->numBlocksAlloc = partId->curBlocksAllocated;	}    semGive (&partId->sem);    /* Convert from words to bytes */    ppartStats->numBytesFree *= 2;    ppartStats->maxBlockSizeFree *= 2;    ppartStats->numBytesAlloc  *= 2;    return (OK);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产伦精品一区二区三区在线观看| 久久老女人爱爱| 久久精品视频一区二区| 亚洲国产日韩一级| 国产盗摄一区二区| 欧美久久久久久蜜桃| 国产精品不卡一区二区三区| 日本欧美在线观看| 99re热这里只有精品视频| 欧美xxx久久| 性做久久久久久免费观看欧美| 国产高清不卡一区| 91精品欧美久久久久久动漫| 亚洲一区二区偷拍精品| 成人avav影音| 亚洲国产精品成人综合| 精品中文字幕一区二区| 51精品视频一区二区三区| 亚洲精品欧美在线| 成人开心网精品视频| 久久免费视频一区| 麻豆免费精品视频| 欧美一区二区免费观在线| 亚洲国产sm捆绑调教视频| 99这里只有精品| 中文字幕在线观看不卡视频| 成人综合婷婷国产精品久久| 久久久亚洲欧洲日产国码αv| 免费一级片91| 精品少妇一区二区三区 | 亚洲人一二三区| 国产一区二区三区免费播放| 精品国产网站在线观看| 看片网站欧美日韩| 欧美电影精品一区二区| 极品少妇xxxx精品少妇偷拍| 精品av综合导航| 国内久久婷婷综合| 国产欧美精品在线观看| 成人黄色综合网站| 中文字幕一区二区三区四区不卡| 99re热视频这里只精品| 玉足女爽爽91| 欧美日韩和欧美的一区二区| 日韩黄色一级片| 欧美一卡在线观看| 国产一区 二区 三区一级| 久久久久久久久一| 不卡一二三区首页| 亚洲第一激情av| 欧美一区二区免费| 国产传媒日韩欧美成人| 亚洲男人的天堂av| 欧美久久一二三四区| 狠狠色丁香婷婷综合| 中文字幕一区二区三区乱码在线| 91亚洲精品久久久蜜桃网站| 亚洲国产精品久久久久婷婷884| 欧美人伦禁忌dvd放荡欲情| 久久狠狠亚洲综合| 日本一区二区免费在线观看视频 | 国产乱码字幕精品高清av| 中国av一区二区三区| 91福利视频在线| 国产一区二区三区四区五区美女| 亚洲欧洲韩国日本视频| 欧美电影一区二区| 成人小视频在线观看| 亚洲va国产va欧美va观看| 26uuu精品一区二区在线观看| av成人老司机| 奇米影视在线99精品| 中文字幕第一区综合| 国产日本欧美一区二区| 欧美日韩在线播放一区| 国产91精品久久久久久久网曝门| 一区二区三区资源| 亚洲精品一区二区三区蜜桃下载| 在线观看网站黄不卡| 国产美女精品人人做人人爽| 亚洲国产wwwccc36天堂| 国产精品久久久久久久浪潮网站 | 国产精品色婷婷久久58| 欧美日韩久久不卡| 99re成人在线| 国产精品一卡二卡在线观看| 亚洲成va人在线观看| 国产精品视频yy9299一区| 精品日韩成人av| 欧美性生活久久| 成人免费毛片高清视频| 精品一区二区三区欧美| 亚洲成人tv网| 国产精品短视频| 久久精品视频一区| 欧美大片在线观看一区二区| 色噜噜狠狠一区二区三区果冻| 国产精品18久久久久久久网站| 图片区小说区区亚洲影院| 亚洲一区二区欧美日韩 | 国产无遮挡一区二区三区毛片日本| 欧洲精品中文字幕| 色又黄又爽网站www久久| 岛国一区二区三区| 成人性生交大片免费看视频在线| 久久99在线观看| 免费精品99久久国产综合精品| 亚洲大片精品永久免费| 一区二区视频免费在线观看| 亚洲欧美日韩系列| 国产精品乱人伦一区二区| 久久天堂av综合合色蜜桃网| 日韩欧美国产三级| 日韩一级视频免费观看在线| 欧美一级欧美一级在线播放| 69p69国产精品| 欧美一区二区视频观看视频 | 亚洲色图在线看| 中文字幕一区在线观看视频| 国产精品每日更新在线播放网址| 久久久久国产一区二区三区四区| ww亚洲ww在线观看国产| 久久一二三国产| 国产亚洲婷婷免费| 国产精品美女久久久久久久久久久| 国产亚洲一区字幕| 专区另类欧美日韩| 一区二区三区四区视频精品免费| 一区二区三区日本| 五月天一区二区三区| 极品少妇一区二区| 成人激情校园春色| 欧美在线视频不卡| 51久久夜色精品国产麻豆| 精品国产乱码久久久久久久久| 久久夜色精品一区| 中文字幕中文字幕一区二区| 一区二区三区四区在线播放| 日韩成人精品视频| 国产中文字幕一区| 一本久道久久综合中文字幕| 欧美三级电影网| 欧美mv日韩mv国产网站app| 欧美国产成人精品| 午夜精品视频一区| 国产激情视频一区二区在线观看 | 成人一道本在线| 在线观看亚洲a| 亚洲精品一区二区三区四区高清| 国产精品天天看| 亚洲福中文字幕伊人影院| 精品一区二区三区在线播放| 9l国产精品久久久久麻豆| 91精品国产美女浴室洗澡无遮挡| 久久精品夜色噜噜亚洲aⅴ| 亚洲激情欧美激情| 精品一区二区免费看| 91久久国产综合久久| 欧美本精品男人aⅴ天堂| 亚洲美女淫视频| 日本人妖一区二区| 91精彩视频在线| 精品国产第一区二区三区观看体验| 一区免费观看视频| 久久精品二区亚洲w码| 91精彩视频在线观看| 久久久久国产一区二区三区四区| 亚洲3atv精品一区二区三区| 成人午夜免费av| 日韩精品一区二区三区在线| 玉足女爽爽91| 成人ar影院免费观看视频| 欧美一区二区久久久| 亚洲影院在线观看| 99国产精品一区| 国产午夜亚洲精品不卡| 青青草原综合久久大伊人精品优势| 99视频在线精品| 国产精品午夜免费| 国产美女娇喘av呻吟久久| 欧美刺激脚交jootjob| 亚洲国产wwwccc36天堂| 99国产精品国产精品久久| 欧美激情在线观看视频免费| 狠狠色狠狠色综合日日91app| 欧美精品在线视频| 一区二区三区四区亚洲| 99re亚洲国产精品| 综合久久给合久久狠狠狠97色| 国产精品一区一区| 久久女同互慰一区二区三区| 另类欧美日韩国产在线| 日韩欧美国产1| 日本午夜一本久久久综合| 欧美日韩国产中文| 五月综合激情日本mⅴ| 欧美日韩三级在线| 香蕉加勒比综合久久| 欧美日韩你懂的| 丝袜美腿成人在线|