vmalloc for zlib workspace

matsunaga matsunaga_kazuhisa at yahoo.co.jp
Fri May 23 13:02:46 EDT 2003


----- Original Message ----- 
From: "Jörn Engel" <joern at wohnheim.fh-wedel.de>
To: "matsunaga" <matsunaga_kazuhisa at yahoo.co.jp>
Cc: <linux-mtd at lists.infradead.org>
Sent: Friday, May 23, 2003 4:57 AM
Subject: Re: vmalloc for zlib workspace

> Great idea!
>
> How about:
>
> static void deflate_workspace[WORKSPACESIZE];
> static void inflate_workspace[WORKSPACESIZE];
>
> int __init jffs2_zlib_init(void)
> {
> if (WORKSPACESIZE < zlib_deflate_workspacesize())
> BUG();
> if (WORKSPACESIZE < zlib_inflate_workspacesize())
> BUG();
> return 0;
> }

That's great idea too ;-)
We only have to check the size in init routine.

> In a second patch, it would be possible to fold those two workspaces
> into one and save a little memory as well.

I think it is better.

Matsunaga

__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/




More information about the linux-mtd mailing list