Skip to contentSkip to conversation

kmalloc() size-limitation

Linux-ia64 Christian Hildner 3 participants 3 messages Jan 15, 2002 – Feb 4, 2002

lore
Share & tools
lore
#0 lore raw

David,

you proposed me to use alloc_pages() instead of kmalloc() in order to get memory bigger than the 128K limit of the kmalloc() call. But even driver-developers don't want to handle with the page struct unless this is unavoidable. Which are the disadvantages of increasing the size limit of kmalloc() to 256K, 512K or 1M since machines are getting bigger and 64Bit machines break with current memory limitations?

Since kmalloc() is implemented in the non arch specific part this also goes to the lkml.

Christian

#1 lore raw

if I am not missing something, kmalloc is SLAB based on _get_free_pages nowadays, and alloc_pages() is based on _get_free_pages directly. you may get the more limitations than alloc_pages(). the reason for choosing kmalloc mainly, is that it makes less fragments when allocing and freeing memories that's not large as pages.

-----Original Message-----
From: Christian Hildner [mailto:[email protected]]
Sent: 2002年1月15日 15:15
To: [email protected]; linux ia64 kernel list; LKML
Subject: [Linux-ia64] kmalloc() size-limitation

David,

you proposed me to use alloc_pages() instead of kmalloc() in order to get memory bigger than the
128K limit of the kmalloc() call. But even driver-developers don't want to handle with the page
struct unless this is unavoidable. Which are the disadvantages of increasing the size limit of
kmalloc() to 256K, 512K or 1M since machines are getting bigger and 64Bit machines break with
current memory limitations?

Since kmalloc() is implemented in the non arch specific part this also goes to the lkml.

Christian

_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64

#2 lore raw
In reply to Christian Hildner
Quoted 9 lines · Christian Hildner

David,

you proposed me to use alloc_pages() instead of kmalloc() in order to get memory bigger than the 128K limit of the kmalloc() call. But even driver-developers don't want to handle with the page struct unless this is unavoidable. Which are the disadvantages of increasing the size limit of kmalloc() to 256K, 512K or 1M since machines are getting bigger and 64Bit machines break with current memory limitations?

Because drivers needs to work on all architectures and relying on different hahavior from kmalloc() is bad.

Jes