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

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

?? memshow.c

?? This is a source code of VxWorks
?? 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一区二区三区免费野_久草精品视频
蜜桃在线一区二区三区| 在线视频欧美区| 色综合天天综合给合国产| 91麻豆精品国产91久久久更新时间| 久久婷婷国产综合国色天香| 一区二区三区加勒比av| 国产精品一区二区在线播放 | 欧美日韩电影在线播放| 国产精品欧美精品| 国产一区二区在线视频| 欧美日韩dvd在线观看| 亚洲欧美日韩中文播放| 成人综合激情网| 久久女同性恋中文字幕| 麻豆91在线观看| 欧美日韩国产综合一区二区三区| 国产精品丝袜在线| 国产一区二区三区在线观看免费视频 | 日韩成人精品视频| 91九色02白丝porn| 国产精品护士白丝一区av| 国产a区久久久| 国产色婷婷亚洲99精品小说| 麻豆成人综合网| 精品国产凹凸成av人导航| 麻豆精品一区二区| 专区另类欧美日韩| 成人精品小蝌蚪| 国产精品乱码人人做人人爱 | 麻豆精品一区二区| 91.麻豆视频| 麻豆极品一区二区三区| 精品欧美一区二区三区精品久久 | 97久久精品人人做人人爽50路| 国产网红主播福利一区二区| 久久国产日韩欧美精品| 日韩一区二区免费视频| 久久国产综合精品| 久久婷婷成人综合色| 国产精品18久久久久久久久| 国产精品水嫩水嫩| aaa欧美日韩| 一区二区三区四区av| 欧美日韩美少妇| 美女www一区二区| 久久久精品欧美丰满| 国产麻豆精品久久一二三| 国产精品久久久久aaaa樱花 | 亚洲成人中文在线| 宅男在线国产精品| 国产精品1024| 一区二区在线观看免费| 欧美另类videos死尸| 久久国产麻豆精品| 欧美激情一区二区三区全黄| 99久久久精品免费观看国产蜜| 亚洲欧美视频在线观看视频| 欧美系列一区二区| 精品一区二区成人精品| 中文字幕精品一区二区精品绿巨人| 91老师片黄在线观看| 亚洲第一二三四区| 久久你懂得1024| 欧美亚一区二区| 精品一区二区三区在线播放视频| 亚洲国产成人午夜在线一区| 欧美午夜精品电影| 国产九色精品成人porny| 亚洲精品中文在线影院| 日韩三级伦理片妻子的秘密按摩| 成人性视频免费网站| 午夜欧美电影在线观看| 中文字幕av资源一区| 欧美美女bb生活片| 成人一区二区三区视频| 免费三级欧美电影| 亚洲美女屁股眼交| 久久久91精品国产一区二区三区| 欧美性一二三区| 岛国一区二区三区| 欧美aⅴ一区二区三区视频| 日韩美女视频一区二区| 久久久亚洲精品石原莉奈| 欧美色电影在线| 99re视频这里只有精品| 激情综合亚洲精品| 午夜伦理一区二区| 亚洲裸体在线观看| 中文字幕欧美日本乱码一线二线| 欧美高清视频在线高清观看mv色露露十八| 国产精品一区二区x88av| 日日摸夜夜添夜夜添国产精品| 国产精品欧美综合在线| 久久午夜羞羞影院免费观看| 欧美一区二区三区在| 欧美色综合天天久久综合精品| 不卡的av电影在线观看| 国产精品亚洲一区二区三区妖精| 日韩国产精品91| 亚洲一二三专区| 亚洲精品福利视频网站| 国产精品欧美久久久久无广告| 久久精品视频网| 欧美大片在线观看一区| 日韩免费高清视频| 精品国产一区二区三区久久久蜜月| 777a∨成人精品桃花网| 欧美日韩高清在线播放| 欧美日韩高清一区二区三区| 91国偷自产一区二区开放时间| 91免费在线看| 在线免费观看日本一区| 在线观看视频91| 欧美视频一二三区| 7777精品伊人久久久大香线蕉的 | 国产精品视频yy9299一区| 欧美videos中文字幕| 日韩欧美自拍偷拍| 久久综合九色综合欧美亚洲| 欧美videos中文字幕| 久久久久久97三级| 国产精品传媒在线| 中文字幕在线观看一区二区| 亚洲欧美在线高清| 亚洲国产欧美另类丝袜| 日韩黄色片在线观看| 免费人成网站在线观看欧美高清| 麻豆国产91在线播放| 国产一区久久久| 成人av电影观看| 欧美天堂一区二区三区| 日韩视频一区二区三区在线播放| 日韩精品中午字幕| 国产精品网站导航| 一区二区三区资源| 麻豆久久久久久久| 成人免费精品视频| 在线免费观看日韩欧美| 欧美一级高清片| 中文一区二区在线观看| 一区二区三区在线观看欧美| 午夜精品久久久久久久久| 美女网站在线免费欧美精品| 成人午夜视频免费看| 色婷婷综合久久久久中文| 欧美日本乱大交xxxxx| 久久久久国产精品免费免费搜索| 亚洲欧美一区二区久久| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产福利精品一区| 欧美性受xxxx黑人xyx性爽| 精品国精品国产尤物美女| 亚洲乱码中文字幕综合| 国产一区二区三区美女| 91国模大尺度私拍在线视频| 久久婷婷久久一区二区三区| 一区二区三区在线看| 国产又粗又猛又爽又黄91精品| 在线欧美小视频| 欧美激情在线免费观看| 男男视频亚洲欧美| 色综合久久综合网欧美综合网 | 亚洲免费三区一区二区| 日韩专区中文字幕一区二区| 成人久久视频在线观看| 日韩精品一区二区三区四区 | 国产精品国产三级国产有无不卡| 午夜欧美一区二区三区在线播放| 国产精品456| 欧美一区二区三区四区在线观看| 自拍偷拍亚洲综合| 国产成人综合网站| 日韩欧美你懂的| 五月综合激情网| 色婷婷综合激情| 欧美国产精品v| 国产精品一色哟哟哟| 欧美一卡2卡三卡4卡5免费| 亚洲综合另类小说| www.亚洲精品| 国产精品久久毛片av大全日韩| 激情综合亚洲精品| 精品黑人一区二区三区久久| 婷婷丁香久久五月婷婷| 欧美日韩免费电影| 亚洲午夜电影在线观看| 欧美在线你懂的| 一区二区免费在线播放| 91毛片在线观看| 亚洲你懂的在线视频| 99久久伊人网影院| 国产精品丝袜黑色高跟| 成人免费毛片片v| 国产精品国产三级国产a| 99久久免费精品高清特色大片| 国产精品久久午夜| 91在线视频免费观看| 亚洲免费在线视频一区 二区| aaa欧美日韩| 亚洲国产另类av|