Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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±à³Ì(Áù) L2CAP±à³ÌʵÀý

ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
 Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......

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 ......

7.1.1 Linux·ÖÇø¼ò½é

7.1.1  Linux·ÖÇø¼ò½é
Ëùν·ÖÇø£¬¾ÍÊÇ´ÅÅÌÉϽ¨Á¢µÄÓÃÓÚ´æ´¢Êý¾ÝºÍÎļþµÄµ¥¶ÀÇøÓò²¿·Ö¡£´ÅÅÌ·ÖÇø¿ÉÒÔ·ÖΪÖ÷·ÖÇøºÍÀ©³ä·ÖÇø£¬ÆäÖÐÖ÷·ÖÇø¾ÍÊÇ°üº¬²Ù×÷ϵͳÆô¶¯Ëù±ØÐëµÄÎļþºÍÊý¾ÝµÄ´ÅÅÌ·ÖÇø£»À©³ä·ÖÇøÒ»°ãÓÃÀ´´æ·ÅÊý¾ÝºÍÓ¦ÓóÌÐòÎļþ¡£Ò»¸ö´ÅÅÌ×î¶à¿É·ÖΪ4¸ö·ÖÇø£¬×î¶à¿ÉÒÔÓÐ4¸öÖ÷·ÖÇø£¬¼´È«²¿·ÖÇø¶¼±»»®·ÖΪÖ÷·ÖÇø¡£Èç¹ ......

ÔÚLinuxÏ°²×°ºÍʹÓÃMySQL

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ÄÚ´æ¹ÜÀí ÄÚ´æ·ÖÅ亯ÊýµÄÑ¡Ôñ

ÄÚ´æ·ÖÅ亯ÊýµÄÑ¡Ôñ
 
Èç¹ûÄãÐèÒªÁ¬ÐøµÄÎïÀíÒ³£¬¾Í¿ÉÒÔʹÓÃij¸öµÍ¼¶Ò³·ÖÅäÆ÷»òÕßkmalloc()¡£ÕâÊÇÄÚºËÖÐÄÚ´æ·ÖÅäµÄ³£Ó÷½Ê½£¬Ò²ÊÇ´ó¶àÊýÇé¿öÏÂÄã×Ô¼ºÓ¦¸ÃʹÓõÄÄÚ´æ·ÖÅ䷽ʽ¡£´«µÝ¸øÕâЩº¯Êý×î³£ÓõÄÁ½¸ö±êÖ¾ÊÇGFP_AUTOMICºÍGFP_KERNEL¡£GFP_AUTOMIC±íʾ½øÐв»Ë¯ÃߵĸßÓÅÏȼ¶·ÖÅä¡£ÕâÊÇÖжϳÌÐòºÍÆäËû²»ÄÜ˯ÃߵĴúÂë¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ