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

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

?? memshow.c

?? vxworks操作系統(tǒng)的源代碼
?? C
字號(hào):
/* 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
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品在线观看| 久久综合九色综合欧美98 | 人人精品人人爱| 5858s免费视频成人| 日本sm残虐另类| 久久久精品天堂| 91丨porny丨在线| 人禽交欧美网站| 久久久国产一区二区三区四区小说| 激情丁香综合五月| 国产精品久久久久精k8| 欧洲精品在线观看| 精品中文字幕一区二区| 国产色91在线| 欧美一区二区三区在线观看 | 日日夜夜免费精品| 欧美一区二区三级| 91麻豆免费观看| 国内久久精品视频| 亚洲影院免费观看| 欧美激情综合五月色丁香| 4438成人网| 欧美日韩精品是欧美日韩精品| 99精品视频免费在线观看| 亚洲亚洲人成综合网络| 欧美成人精品福利| 欧美肥妇毛茸茸| 91国在线观看| 欧美三区在线观看| 欧美主播一区二区三区| 99热在这里有精品免费| 国产成人综合亚洲网站| 精品亚洲aⅴ乱码一区二区三区| 亚洲欧美日韩国产成人精品影院| 日韩午夜中文字幕| 日韩欧美国产一区二区三区| 欧美体内she精高潮| 91麻豆视频网站| 欧美性做爰猛烈叫床潮| 99麻豆久久久国产精品免费优播| 成人av在线一区二区| 国产 日韩 欧美大片| av亚洲精华国产精华精华| 成人高清视频在线观看| 丰满白嫩尤物一区二区| 国产成人亚洲精品狼色在线| 国产精品456露脸| 成人免费精品视频| 91精品国产综合久久精品图片| 91 com成人网| 日韩一区和二区| 成人精品在线视频观看| 蜜臀av性久久久久蜜臀aⅴ流畅| 免费av成人在线| 国产一区高清在线| aaa亚洲精品| 精品国产乱码久久久久久浪潮 | hitomi一区二区三区精品| 97精品久久久久中文字幕| 欧美一级理论片| 亚洲欧洲av在线| 国产九色精品成人porny| 91免费在线视频观看| 精品国偷自产国产一区| 国产精品久久久久久久蜜臀| 亚洲大尺度视频在线观看| 国产成人精品免费一区二区| 91麻豆精品国产91久久久| 亚洲嫩草精品久久| 成人深夜在线观看| 国产视频一区二区在线| 日韩精品一区第一页| 欧洲一区在线电影| 亚洲色图欧洲色图| 色8久久精品久久久久久蜜| 欧美经典一区二区三区| 国产传媒久久文化传媒| 久久毛片高清国产| 国产一区二区三区不卡在线观看| 日韩欧美高清一区| 国产盗摄女厕一区二区三区| 欧美成人在线直播| 国产中文一区二区三区| 国产亚洲欧美激情| 99re热这里只有精品视频| 国产精品毛片久久久久久| eeuss影院一区二区三区| 亚洲色图一区二区三区| 这里只有精品99re| 国产精品中文字幕日韩精品| 欧美激情综合在线| 欧美男生操女生| 成人一级视频在线观看| 亚洲精品你懂的| 久久久久久电影| 91福利国产精品| 国产精品一区二区在线观看不卡 | 成人精品电影在线观看| 亚洲综合一二区| 久久久久久久久97黄色工厂| 色综合天天狠狠| 国产乱子伦视频一区二区三区 | 亚洲图片欧美一区| 国产亚洲一本大道中文在线| 欧美电影在线免费观看| 懂色av一区二区在线播放| 婷婷中文字幕综合| 亚洲精品伦理在线| 欧美极品美女视频| 国产婷婷精品av在线| 日韩一区二区三区高清免费看看 | 99久久精品国产麻豆演员表| 欧美撒尿777hd撒尿| 亚洲国产精品麻豆| 中文字幕一区在线观看视频| 亚洲精品一区二区在线观看| 欧美亚洲综合另类| 粉嫩aⅴ一区二区三区四区 | 在线不卡中文字幕播放| 色偷偷久久一区二区三区| 99国产一区二区三精品乱码| 国产成人精品在线看| 黄色日韩三级电影| 国产精品综合av一区二区国产馆| 韩国欧美国产1区| 国产电影精品久久禁18| 成人午夜电影网站| 欧美做爰猛烈大尺度电影无法无天| 成人午夜激情片| 在线视频国产一区| 91精品国产高清一区二区三区| 337p亚洲精品色噜噜噜| 精品国产污污免费网站入口 | 中文在线一区二区| 综合久久久久久| 另类专区欧美蜜桃臀第一页| 国内精品伊人久久久久av影院 | 欧美在线观看18| 日韩色视频在线观看| 国产日韩欧美a| 亚洲国产综合色| 成人app网站| 精品国产亚洲一区二区三区在线观看| 国产亚洲一区字幕| 午夜婷婷国产麻豆精品| 成人h动漫精品一区二区| 欧美丝袜自拍制服另类| 国产精品久久毛片a| 午夜视频在线观看一区二区三区| 福利一区福利二区| 欧美大肚乱孕交hd孕妇| 亚洲午夜激情av| 99re6这里只有精品视频在线观看| 日韩三级中文字幕| 亚洲福利一二三区| 在线看国产一区| 中文字幕亚洲综合久久菠萝蜜| 久久av资源网| 久久综合色婷婷| 国内精品免费**视频| 日韩一区二区视频| 蜜臀av性久久久久av蜜臀妖精 | 91精品国产91久久久久久一区二区 | 狠狠色丁香久久婷婷综合丁香| 国产aⅴ综合色| 国产三区在线成人av| 青青草精品视频| 欧美日韩国产大片| 欧美v国产在线一区二区三区| 久久精品一区蜜桃臀影院| 黄页网站大全一区二区| 精品亚洲aⅴ乱码一区二区三区| 色天使色偷偷av一区二区| 国产精品国产三级国产普通话三级 | 国产美女娇喘av呻吟久久| 欧美性大战久久久久久久蜜臀 | 欧美tk丨vk视频| 韩国v欧美v亚洲v日本v| 精品国产成人在线影院| 亚洲图片有声小说| 欧美人体做爰大胆视频| 性欧美大战久久久久久久久| 欧美视频精品在线| 天堂一区二区在线| 日韩精品一区二区三区在线观看 | 中文字幕在线免费不卡| 国产精品1区二区.| 亚洲一级二级在线| 91福利国产精品| 久久国产成人午夜av影院| 久久一区二区三区四区| 日韩av不卡在线观看| wwwwww.欧美系列| 欧美精品色综合| 天天综合色天天| 国产欧美一区二区精品仙草咪| 国产在线看一区| 中文字幕在线观看一区二区| 国产在线国偷精品产拍免费yy | 久久精品视频网|