⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usermem

📁 早期freebsd实现
💻
字号:
: This shell script snoops around to find the maximum amount of available: user memory.  These variables need to be set only if there is no: /usr/adm/messages.  KMEM, UNIX, and CLICKSIZE can be set on the command: line, if desired, e.g. UNIX=/unixKMEM=/dev/kmem		# User needs read access to KMEMUNIX=# VAX			CLICKSIZE=512,	UNIX=/vmunix# PDP-11		CLICKSIZE=64,	UNIX=/unix# CADLINC 68000		CLICKSIZE=4096,	UNIX=/unix# Perkin-Elmer 3205	CLICKSIZE=4096,	UNIX=/edition7# Perkin-Elmer all others, CLICKSIZE=2048, UNIX=/edition7CLICKSIZE=512eval $*SIZE=0if test -r /usr/adm/messages	# probably the most transportablethen    SIZE=`grep avail /usr/adm/messages | sed -n '$s/.*[ 	]//p'`fiif test 0$SIZE -le 0		# no SIZE in /usr/adm/messagesthen    if test -r $KMEM		# Readable KMEM    then	if test -n "$UNIX"	then	    : User must have specified it already.	elif test -r /vmunix	then	    UNIX=/vmunix	    CLICKSIZE=512	# Probably VAX	elif test -r /edition7	then	    UNIX=/edition7	    CLICKSIZE=2048	# Perkin-Elmer: change to 4096 on a 3205	elif test -r /unix	then	    UNIX=/unix		# Could be anything	fi	if test -n "$UNIX"	then	    SIZE=`echo maxmem/D | adb $UNIX $KMEM | sed -n '$s/.*[ 	]//p'`	    if test 0$SIZE -le 0	    then		SIZE=`echo physmem/D | adb $UNIX $KMEM | sed -n '$s/.*[ 	]//p'`	    fi	    SIZE=`expr 0$SIZE '*' $CLICKSIZE`	fi    fificase $UNIX in    /vmunix)		# Assume 4.2bsd: check for resource limits	MAXSIZE=`csh -c limit | awk 'BEGIN	{ MAXSIZE = 1000000 }/datasize|memoryuse/ && NF == 3	{ if ($2 < MAXSIZE) MAXSIZE = $2 }END	{ print MAXSIZE * 1000 }'`	if test $MAXSIZE -lt $SIZE	then	    SIZE=$MAXSIZE	fi	;;esacif test 0$SIZE -le 0then    echo 0;exit 1else    echo $SIZEfi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -