A question about memory fragmentation
Hi everybody,
I have a question for you; How Linux avoids the memory fragmentation in
linked lists?
Windows 9x/NT/2000 (sorry, ;-)), have specific functions (like List_Create,
ExInitializeSListHead, ...) to create generic linked lists but I don't find something similar in Linux.
Has Linux a generic linked list management API ?
Must I develop this?
Is the kernel memory fragmentation a solved problem in Linux? (I wish it).
I have develop my own API but I don't know if Linux can do this for me.
Thanks in advance.
Abel Muñoz Alcaraz.
Media Security Software Developer.
mailto:[email protected]
Trymedia Systems
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 1 line
Has Linux a generic linked list management API ?
Yes - if you want to use it
<linux/list.h>
Quoted 1 line
Is the kernel memory fragmentation a solved problem in Linux? (I wish =
Its not a problem you can solve without causing serious performance hits so we don't solve it. If you want to allocate large bus linear memory allocations then tough 8). If you want large virtually linear blocks then you can use vmalloc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 7 lines · Abel Muñoz Alcaraz
I have a question for you; How Linux avoids the memory fragmentation in
linked lists?Windows 9x/NT/2000 (sorry, ;-)), have specific functions (like
List_Create,
ExInitializeSListHead, ...) to create generic linked lists but I don't find something similar in Linux.
Has Linux a generic linked list management API ?
Yes.
Quoted 1 line
Must I develop this?
No.
Quoted 1 line
Is the kernel memory fragmentation a solved problem in Linux? (I wish it).
My guess is that the slab allocator solves this, but I don't know that much about the MM.
Quoted 1 line
I have develop my own API but I don't know if Linux can do this for me.
Have a look in include/linux/list.h.
Or install jadetex and the DocBook style sheets and type "make psdocs" in the kernel tree. That will create the file Documentation/DocBook/kernel-api.ps in which the linked list API (and much more) is described.
Erik
Signature · 9 lines
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department of Electrical Engineering, Faculty of Information Technology and Systems, Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands Phone: +31-15-2783635 Fax: +31-15-2781843 Email: [email protected] WWW: http://www-ict.its.tudelft.nl/~erik/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
Quoted 5 lines · Erik Mouw
Quoted 2 lines
Is the kernel memory fragmentation a solved problem in Linux? (I wish it).
My guess is that the slab allocator solves this, but I don't know that much about the MM.
Linux lists implementation stores linking informations directly inside the block of data We're going to link.
This has the advantage that no extra list nodes are allocated to store the data pointer but has the drawback that if We've to link the same data to more than one list We've to declare more than one listhead.
See at the different links We've inside the task_struct for example.
- Davide
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/