共享内存就是进程之间可以共享的一段内存,通过一个唯一的KEY值绑定
shmget()创建或获取
shmat()连接
shmdt()断连共享内存的访问涉及同步措施,通常与信号灯一起使用
用ipcs -m命令可以查看系统中已有的共享内存段/proc/sys/kernel/shm开头的几个文件是共享内存的参数共享内存的访问涉及同步措施,通常与信号灯一起使用
用ipcs -m命令可以查看系统中已有的共享内存段ipcs -m 看Shared Memory 共享内存ipcs -q 看Message Queues 消息队列
ipcs -s 看Semaphore Arrays 信号量使用命令:ipcs -al------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 4091826
max total shared memory (pages) = 2097152
min seg size (bytes) = 1 1. Linux Check Memory Usage
by VIVEK GITE on APRIL 6, 2006 · 36 COMMENTSHow do I check used and free RAM memory usage under Linux operating systems using command line and GUI tools?Linux comes with different set of commands to check memory usage. The free command displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel. The vmstat command reports information about processes, memory, paging, block IO, traps, and cpu activity. Finally, you can use the top command which provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel.free command
Display free memory size in MB:$ free -mOutput: total used free shared buffers cached
Mem: 750 625 125 0 35 335
-/+ buffers/cache: 254 496
Swap: 956 0 956Displays a line containing the totals memory in MB:
$ free -t -m
Output: total used free shared buffers cached
Mem: 750 625 125 0 35 335
-/+ buffers/cache: 253 496
Swap: 956 0 956
Total: 1707 625 1082
升级Fedora 12到最新的Fedora 14Fedora 12中更改Code Blocks调试终端相关资讯 Linux教程
- Linux教程:如何在命令行中查看目 (07/28/2014 12:22:23)
- Linux 修改root密码 (11/03/2012 07:53:38)
- su - root 与su root的区别 (06/06/2012 00:39:40)
| - Linux进程间通信:消息队列 (01/28/2013 09:43:00)
- U盘安装Linux开机无法启动解决方法 (10/07/2012 08:55:52)
- Windows 7/Linux 同步时间 (05/15/2012 06:17:55)
|
本文评论 查看全部评论 (0)