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
相关文档:
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给了很多人一个希望,开源的世界让很多人如痴 ......
我计划的学习历程:
1. c和c++的基础知识,这个和操作系统无关,在windows上也可以学。c语言语法相对简单一点,c++不需要把所有的知识点都学会,要知道基本的封装,继承,多态之类的,还有STL。更深入的学习应该是在以后的工作中遇到问题了再去查资料。
2. 看书《APUE》,做书上的习题,掌握文件,系统调用,线程、进程、 ......
1、下载MySQL的安装文件
安装MySQL需要下面两个文件:
MySQL-server-4.0.23-0.i386.rpm
MySQL-client-4.0.23-0.i386.rpm
下载地址为:http://www.mysql.com/downloads/mysql-4.0.html,打开此网页,下拉网页找到“Linux x86 RPM downloads”项,找到
“Server”和“Client programs&rd ......
一般在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 ......