亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 1800 | 回復(fù): 2
打印 上一主題 下一主題

[內(nèi)核入門] 請教2.6.24內(nèi)核自解壓的滑動窗口刷出數(shù)據(jù)函數(shù)flush_window()的問題 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2013-03-16 21:46 |只看該作者 |倒序瀏覽
我在看2.6.24內(nèi)核,發(fā)現(xiàn)內(nèi)核自解壓的部分和2.6.11不大一樣,滑動窗口不再向輸出數(shù)據(jù)區(qū)刷出數(shù)據(jù)。相關(guān)函數(shù)是arch/x86/boot/compressed/misc_32.c中的flush_window()函數(shù),注釋說由于滑動窗口和輸出緩存是同一個,所以該函數(shù)不用再拷貝窗口數(shù)據(jù)到輸出緩存區(qū)了,只需要計算crc就行。問題是滑動窗口是循環(huán)使用的,寫滿32KB就從頭開始寫覆蓋原數(shù)據(jù),那么最后怎么會得到完整的解壓縮的內(nèi)核呢?我怎么看都不明白,麻煩指點(diǎn)一二。謝謝!

備注:
-----------2.6.11內(nèi)核的arch/i386/boot/compressed/Misc.c----------
static void flush_window_high(void)
{
    ulg c = crc;         /* temporary variable */
    unsigned n;
    uch *in,  ch;
    in = window;
    for (n = 0; n < outcnt; n++) {
ch = *output_data++ = *in++; //這是拷貝窗口的解壓數(shù)據(jù)到輸出數(shù)據(jù)區(qū)的代碼,并調(diào)整指針
if ((ulg)output_data == low_buffer_end) output_data=high_buffer_start;
c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> ;
    }
    crc = c;
    bytes_out += (ulg)outcnt;
    outcnt = 0;
}

-----------2.6.24內(nèi)核的arch/x86/boot/compressed/Misc_32.c----------

/* ===========================================================================
* Write the output window window[0..outcnt-1] and update crc and bytes_out.
* (Used for the decompressed data only.)
*/
static void flush_window(void)
{
/* With my window equal to my output buffer
* I only need to compute the crc here.
*/
ulg c = crc;         /* temporary variable */
unsigned n;
uch *in, ch;

in = window;
for (n = 0; n < outcnt; n++) {
ch = *in++;  //這里窗口數(shù)據(jù)不再拷貝到輸出,只檢查crc而已
c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> ;
}
crc = c;
bytes_out += (ulg)outcnt;
outcnt = 0;
}
已知window是指向輸出地址output,即物理內(nèi)存1MB處的

論壇徽章:
0
2 [報告]
發(fā)表于 2013-03-22 09:15 |只看該作者
請大俠們關(guān)注一下

論壇徽章:
0
3 [報告]
發(fā)表于 2013-05-05 19:40 |只看該作者
暮然回首,那人卻在燈火闌珊處
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP