Re: A question about memory fragmentation

2000-11-07 Thread Alan Cox
> I think that is better to allocate a big piece of memory and get the n= > odes > from this buffer with my own memory management functions; Is this corre= > ct?. See the SLAB interface. It'll do that for you. Kmalloc uses SLAB so will do similarly sane things - To unsubscribe from this li

Re: A question about memory fragmentation

2000-11-07 Thread Francis Galiegue
On Tue, 7 Nov 2000, Abel Muñoz Alcaraz wrote: > > my question is about memory fragmentation when I allocate and free a lot of > small memory pieces in a kernel module. > Can it do a memory fragmentation problem? > Can I solve it using 'linux/list.h' API? Fragmentation is not r

Re: A question about memory fragmentation

2000-11-07 Thread Davide Libenzi
On Tue, 07 Nov 2000, Erik Mouw wrote: > > > 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 b

Re: A question about memory fragmentation

2000-11-07 Thread Erik Mouw
On Tue, Nov 07, 2000 at 04:20:20PM +0100, Abel Muñoz Alcaraz wrote: > 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

Re: A question about memory fragmentation

2000-11-07 Thread Alan Cox
> Has Linux a generic linked list management API ? Yes - if you want to use it > 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 la