lkml.org 
[lkml]   [2002]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: array size limit in module?
On Thu, Jan 10, 2002 at 01:18:35PM -0500, Brian Gerst wrote:
> Use vmalloc for allocations that large, unless you must have the memory
> physically contiguous. 128k is the largest amount of memory you can
> allocate with kmalloc.

Even before he uses vmalloc, he should take a programming 101 course that
explains the importance of error checking. kmalloc returned NULL, the
code didn't handle the case. Switching to vmalloc will only make the code
usually work, but still susceptible to crashing.

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

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