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

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

?? memshow.c

?? vxworks5.5.1源代碼。完整源代碼
?? 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);    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
伊人色综合久久天天| 欧美国产精品一区| 成人理论电影网| 亚洲成a人在线观看| 久久亚洲一级片| 7777女厕盗摄久久久| av不卡免费电影| 精品一区二区国语对白| 亚洲国产精品久久久久秋霞影院| 国产区在线观看成人精品| 91精品蜜臀在线一区尤物| 一本高清dvd不卡在线观看| 国产精品中文欧美| 久久er99热精品一区二区| 亚洲国产一区二区视频| 综合欧美亚洲日本| 欧美国产精品专区| 久久尤物电影视频在线观看| 91精品中文字幕一区二区三区| 色婷婷亚洲婷婷| 91在线播放网址| 不卡欧美aaaaa| 国产激情精品久久久第一区二区 | 久久九九全国免费| 精品少妇一区二区三区视频免付费| 色香蕉久久蜜桃| 91无套直看片红桃| 91社区在线播放| 色综合天天性综合| 91丨九色丨尤物| 99久久久精品免费观看国产蜜| 国产69精品久久99不卡| 国产成人综合精品三级| 国产精品1区2区3区| 国产麻豆视频精品| 国产麻豆成人传媒免费观看| 国产在线视频一区二区| 国产美女久久久久| 国产麻豆午夜三级精品| 成人免费观看av| 色综合一区二区三区| 欧美四级电影在线观看| 欧美在线视频你懂得| 欧美日韩国产乱码电影| 日韩视频一区二区三区在线播放| 欧美一级一区二区| 精品成人一区二区| 日本一区二区三区国色天香 | 美女视频网站久久| 久久精品久久99精品久久| 国产一区二区三区日韩| 国产白丝精品91爽爽久久 | 成人av午夜电影| 色香色香欲天天天影视综合网| 色综合久久天天| 欧美日高清视频| 精品美女被调教视频大全网站| 精品成人一区二区三区四区| 国产精品欧美一级免费| 亚洲欧美激情视频在线观看一区二区三区 | 婷婷久久综合九色综合绿巨人| 日韩精品亚洲专区| 国产乱码精品一区二区三区五月婷 | 欧美美女直播网站| 精品日本一线二线三线不卡| 中文无字幕一区二区三区| **网站欧美大片在线观看| 亚洲二区在线视频| 久久电影网站中文字幕| av激情亚洲男人天堂| 欧美日韩aaaaa| 国产农村妇女毛片精品久久麻豆| 亚洲欧美国产77777| 日本在线观看不卡视频| 成人久久久精品乱码一区二区三区| 色综合久久中文字幕| 欧美www视频| 亚洲天堂2016| 九色综合狠狠综合久久| 91香蕉视频污在线| 欧美精品一区二区在线播放| 日韩理论片中文av| 久久99在线观看| 在线精品国精品国产尤物884a| 日韩欧美亚洲另类制服综合在线| 中文字幕 久热精品 视频在线| 午夜欧美大尺度福利影院在线看 | 欧美嫩在线观看| 国产精品欧美一区二区三区| 日韩av在线播放中文字幕| 成人福利视频在线| 欧美mv和日韩mv的网站| 亚洲福利国产精品| av一二三不卡影片| 久久综合色鬼综合色| 性久久久久久久久| 99re这里只有精品首页| 精品日韩在线观看| 日韩精品亚洲一区二区三区免费| 久久久精品国产99久久精品芒果 | 欧美一区二区在线看| 国产剧情一区二区三区| 欧美这里有精品| 中文字幕中文字幕在线一区| 美女视频黄频大全不卡视频在线播放 | 亚洲精品综合在线| 国产精品1区二区.| 精品国产91乱码一区二区三区| 亚洲一区二区三区视频在线| 成人免费看片app下载| 久久色成人在线| 久久国内精品自在自线400部| 欧美色电影在线| 一区二区三区鲁丝不卡| 99精品欧美一区二区三区小说| 久久免费看少妇高潮| 久久精品国产一区二区三区免费看 | 一区二区三区成人| 9人人澡人人爽人人精品| 国产亚洲精品超碰| 国产在线播精品第三| 欧美成人a在线| 久久www免费人成看片高清| 91精品国产全国免费观看| 亚洲国产日韩综合久久精品| 91色porny在线视频| 亚洲视频资源在线| 91亚洲大成网污www| 亚洲欧洲综合另类| 色综合一个色综合| 一区二区三区四区激情| 在线免费精品视频| 香蕉av福利精品导航| 欧美老年两性高潮| 婷婷国产在线综合| 欧美一区二区三区视频在线| 捆绑紧缚一区二区三区视频| 精品免费日韩av| 国产精品一区2区| 国产欧美精品在线观看| 成人综合激情网| 国产精品香蕉一区二区三区| 国产亚洲欧美激情| 成人激情开心网| 亚洲激情图片一区| 欧美理论电影在线| 精品一区二区三区视频在线观看| 精品国产一区二区三区不卡| 国产福利精品一区二区| 中文字幕一区二区三区在线不卡| 91网站最新网址| 午夜久久电影网| 精品国产污污免费网站入口 | 毛片一区二区三区| 久久日一线二线三线suv| 国产不卡高清在线观看视频| 亚洲视频在线观看三级| 欧美性猛片aaaaaaa做受| 欧美bbbbb| 国产精品蜜臀av| 欧美日韩精品三区| 国产自产高清不卡| 亚洲欧洲av在线| 欧美日韩中文字幕一区二区| 麻豆精品在线观看| 国产精品欧美一级免费| 欧美日本国产视频| 久久久久久毛片| 亚洲成人福利片| 成人av影视在线观看| 日韩精品一区国产麻豆| 国产98色在线|日韩| 亚洲高清免费观看 | zzijzzij亚洲日本少妇熟睡| 亚洲色图.com| 日韩三区在线观看| av动漫一区二区| 蜜臀av一级做a爰片久久| 欧美高清在线视频| 在线视频观看一区| 国产高清成人在线| 亚洲1区2区3区4区| 国产精品久久久久久久久搜平片 | 一卡二卡三卡日韩欧美| 精品国产精品一区二区夜夜嗨 | 亚洲精品在线免费观看视频| 色综合天天在线| 国产一区二区三区久久久 | 成人影视亚洲图片在线| 亚洲成人av资源| 中文字幕一区二区三区av| 日韩精品一区二区三区四区视频 | 久久亚区不卡日本| 欧美精选午夜久久久乱码6080| 国产精品12区| 男女性色大片免费观看一区二区| 综合久久久久综合| 国产精品私人自拍| 久久伊人中文字幕| 欧美一区二区三区免费在线看 |