Re: [lc-devel] WK4x4
Status: Beta
Brought to you by:
nitin_sf
From: Rodrigo S. de C. <rc...@im...> - 2003-10-13 13:17:59
|
On Sat, Oct 11, 2003 at 12:33:43PM -0400, John R Moser wrote: > What the hell? > > I'm trying to rewrite this code and I'm finding that the WK4x4 algorithm > doesn't appear to use the data structures allocated in the beginnig in > the comp_alg_data * data passed to wk4x4_compress/wk4x4_decompress, or in > ANY of the macros in wk4x4.c. HOWEVER it does get used in wkdm. Why not > NOT allocate the data for WK4x4? Indeed, it seems to be useless to allocate data for WK4x4. I check the code and couldn´t find a reference to "data" parameter, and also downloaded the original WK4x4 code, getting to the same result. Probably this "data" parameter was introduced in order to make the interface the same as WKdm. > I'm going to rewrite the wk4x4 alloc function to not allocate the data, > and move that code into the wkdm function. That should allieviate most > of the issues with extremely low ram boxes running out of RAM with wk4x4, > since the alg allocates 3.6k of RAM (think about 3 meg boxes :P). It shouldn´t be allocate at all if it isn´t used, not matter if it´s not that much memory :-) > Realisticly, at this point there's no way you're running out of RAM, or else > the box isn't going to boot anyway; But it just annoys me. > > oh, proc.c is pretty much done. I'm not so sure about the page > stuff though. I did modify the page structure, What page structure? "struct comp_page" to include algorithm information? > but I don't know how to make it set the algorithm to -1 on page > allocation, so when it compreses a page it'll likely either pick a > random alg that just happens to have the same index as the garbage > at that point, or pick the default alg. What exactly are you trying to do? If you added a field to "struct comp_page", and this page is allocated only when it´s about to be compressed, you can set it to the chosen alg at that moment. Regards, -- Rodrigo |