* 128 kbytes allocation limit for kmalloc?
@ 2005-09-27 17:40 mailarch
2005-09-27 17:49 ` Brian Gerst
2005-09-28 12:55 ` Hagen Paul Pfeifer
0 siblings, 2 replies; 3+ messages in thread
From: mailarch @ 2005-09-27 17:40 UTC (permalink / raw)
To: linux-kernel
Hello,
is it possible to allocate more than 128 kbytes in a kernel lkm module?
When I allocate more than 128 kbytes with the kmalloc call, kmalloc returns NULL.
--
Best regards,
Stephan Ferraro
NOOFS Core Developper
http://www.noofs.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 128 kbytes allocation limit for kmalloc?
2005-09-27 17:40 128 kbytes allocation limit for kmalloc? mailarch
@ 2005-09-27 17:49 ` Brian Gerst
2005-09-28 12:55 ` Hagen Paul Pfeifer
1 sibling, 0 replies; 3+ messages in thread
From: Brian Gerst @ 2005-09-27 17:49 UTC (permalink / raw)
To: mailarch; +Cc: linux-kernel
mailarch@archivum.info wrote:
> Hello,
>
> is it possible to allocate more than 128 kbytes in a kernel lkm module?
> When I allocate more than 128 kbytes with the kmalloc call, kmalloc returns NULL.
>
No. Use vmalloc(). Keep in mind that kernel memory is a limited
resource, so don't use more memory that you really have to.
--
Brian Gerst
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 128 kbytes allocation limit for kmalloc?
2005-09-27 17:40 128 kbytes allocation limit for kmalloc? mailarch
2005-09-27 17:49 ` Brian Gerst
@ 2005-09-28 12:55 ` Hagen Paul Pfeifer
1 sibling, 0 replies; 3+ messages in thread
From: Hagen Paul Pfeifer @ 2005-09-28 12:55 UTC (permalink / raw)
To: linux-kernel
* mailarch@archivum.info | 2005-09-27 19:40:32 [+0200]:
>Hello,
>
>is it possible to allocate more than 128 kbytes in a kernel lkm module?
Yes, multiple kmalloc calls. You can implement your own memory managment
in top of it. For further informations: cat /proc/slabinfo
>When I allocate more than 128 kbytes with the kmalloc call, kmalloc returns NULL.
If you need one continues chunk of memory you must take vmalloc. But
note the performance penalty and some other disadvantages (dma, ...).
HGN
--
Standards are industry's way of codifying obsolescence.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-09-28 12:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-27 17:40 128 kbytes allocation limit for kmalloc? mailarch
2005-09-27 17:49 ` Brian Gerst
2005-09-28 12:55 ` Hagen Paul Pfeifer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).