lkml.org 
[lkml]   [2003]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Port SquashFS to 2.6
From
Date
>>>>> "DD" == David Dillow <dave@thedillows.org> writes:

DD> On Sat, 2003-07-19 at 18:59, junkio@cox.net wrote:
>> ...
>> + while(length < index) {
>> + char buffer[PAGE_CACHE_SIZE];

DD> Hmm, isn't that 4K allocated on the stack? Ouch.

Ouch indeed. I was not looking for these things (I was just
porting not fixing). Thank you for pointing it out. Have a
couple of questions:

- Would it be an acceptable alternative here to use blocking
kmalloc upon entry with matching kfree before leaving?

- I would imagine that the acceptable stack usage for functions
would depend on where they are called and what they call.
Coulc you suggest a rule-of-thumb number for
address_space_operations.readpage (say, would 1kB be OK but
not 3kB?)

- Would the same rule apply to 2.4 filesystem layer?

-
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:47    [W:0.073 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site