lkml.org 
[lkml]   [2000]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kmalloc() allocation.


"Richard B. Johnson" wrote:
>
> Hello,
> How much memory would it be reasonable for kmalloc() to be able
> to allocate to a module?
>
> Oct 30 10:48:31 chaos kernel: kmalloc: Size (524288) too large
>
> Using Version 2.2.17, I can't allocate more than 64k! I need
> to allocate at least 1/2 megabyte and preferably more (like 2 megabytes).

I glad someone asked this. The embedded system I am working on requires
that I allocate about at least 64KB or so of physically contiguous RAM,
to be used as the "backing store" for a PCI<->SDRAM mapper chip. What
makes this difficult is that it has to be aligned on a 256KB boundary,
so the only way to guarantee this is to allocate 512KB and only use the
256KB-aligned chunk within that.

I have already tried reserving the memory at boot time with the mem
kernel argument, but our boot loader is broken and the kernel won't boot
when arguments are passed to the kernel. Is there an easy way to
hardcode this argument into the kernel?

I have also looked into allocation at boot time, but the init functions
in init/main.c no longer have a return value in 2.4. Is there still a
way to do this?

--
Mark McClelland
mwm@i.am
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.085 / U:5.900 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site