易截截图软件、单文件、免安装、纯绿色、仅160KB

Anatomy of the Linux slab allocator

Anatomy of the Linux slab allocator
Learn how Linux manages memory
M. Tim Jones, Consultant Engineer, Emulex Corp.
M. Tim Jones is an embedded software architect and the author of GNU/Linux Application Programming, AI Application Programming, and BSD Sockets Programming from a Multilanguage Perspective. His engineering background ranges from the development of kernels for geosynchronous spacecraft to embedded systems architecture and networking protocols development. Tim is a Consultant Engineer for Emulex Corp. in Longmont, Colorado.
Summary:  Good operating system performance depends in part on the operating system's ability to efficiently manage resources. In the old days, heap memory managers were the norm, but performance suffered due to fragmentation and the need for memory reclamation. Today, the Linux® kernel uses a method that originated in Solaris but has been used in embedded systems for quite some time, allocating memory as objects based on their size. This article explores the ideas behind the slab allocator and examines its interfaces and their use.
Tag this!
Update My dW interests (Log in | What's this?) Skip to help for Update My dW interests
Date:  15 May 2007
Level:  Intermediate
Activity:  16559 views
Comments:   0 (Add comments)
Average rating (based on 90 votes)
Dynamic memory management
The goal of memory management is to provide a method by which memory can be dynamically shared amongst a variety of users for a variety of purposes. The memory management method should do both of the following:
Minimize the amount of time required to manage the memory
Maximize the available memory for general usage (minimize management overhead)
Memory management is ultimately a zero-sum game of tradeoffs. You can develop an algorithm that uses little memory for management but takes more time to manage the available memory. You can also develop an algorithm that efficiently manages memory but uses a bit more


相关文档:

实战Linux Bluetooth编程(三) HCI层编程

1. HCI层协议概述:
HCI提供一套统一的方法来访问Bluetooth底层。如图所示:
从图上可以看出,Host Controller Interface(HCI)  就是用来沟通Host和Module。Host通常就是PC, Module则是以各种物理连接形式(USB,serial,pc-card等)连接到PC上的bluetooth Dongle。
在Host这一端:application,SDP,L2cap等协议 ......

Linux下守护进程的创建例子

#include <stdio.h>
#include <signal.h>
#include <ctype.h>
#include <fcntl.h>
int g_count;
void Exit()
{
printf("I will exit, press any key to continue...(g_count = %d)\n", g_count);
exit(0);
}
int main(int argc, char* argv[])
{
struct sigaction almact;
pid_t ......

Linux环境下MySQL的安装

1、下载MySQL免安装版/二进制版软件(不用编译)
文件格式:MYSQL-VERSION-OS.tar.gz
 
2、创建MySQL组,建立MySQL用户并加入到mysql组中
(不同版本的Unix中,groupadd和useradd的语法可能会稍有不同。)
#groupadd mysql
#useradd -g mysql mysql
 
3、进入目录/usr/local,解压缩免安装版,并在 ......

linux Bell 报警声音

Console 修改/etc/inputrc文件

set bell-style off
VIM 如果是在 console 模式下使用 vi/vim,一旦按错键会发出 bi 的一声,这样做可以提醒我们,但是很多时候会影响其他人工作、学习或者休息,如何关闭呢?
可以在 vi/vim 中使用
:set noeb
命令(其中 noeb 是 noerrorbells 的缩写) ......

linux 之 ifconfig 命令!

一般在linux下查看网络配置可以使用ifconfig命令,可以显示当前网卡的基本配置信息。
终端输入ifconfig 会出现一下内容:
eth0
Link encap:Ethernet HWaddr 00:0C:29:0C:4B:0F
inet addr:192.168.37.128 Bcast:192.168.37.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:33 er ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号