Re: kernel memory usage any restrictions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2005-05-27 at 18:56 -0700, cranium2003 wrote:

> > Your call will almost certainly fail.  I think
> > kmalloc will only give 
> > you up to 128KB, and even that might be tricky to do
> > with GFP_ATOMIC.
> > 
>          NO I mean the source code total require 625kB
> not i require a single call of kmalloc with GFP_ATOMIC
> but many calls whose total sum will be around 625kB.

Matters what you system is.  I have a gig of RAM and can easily allocate
a meg by 32 32K chunks.  I haven't tried it with ATOMIC, but that just
means it will fail if it can't get you something right away and it needs
to sleep.  But if you keep trying, that is, don't allocate then
(assuming you're in an interrupt) and try again another time (in another
interrupt), you should eventually get the 625kB.  But as this answer is,
you need to supply more context.  If you can't fail any of those tries,
then it probably won't work.  You're system may be cached out, and would
need to write pages to the disk before it can give you the memory you
need, and then it would have to sleep.

-- Steve


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux