- 論壇徽章:
- 0
|
perl的函數(shù)參數(shù) 大小是否有限制呢?程序出現(xiàn)out of memory,debug后發(fā)現(xiàn)是由于下面的函數(shù)第二個(gè)匿名hash造成的。
代碼如下-
- my $objXXXX = XXXXXX::new($_LOG, {
- 'ref_flow' => $phHash1, # key, value比較多,層次比較深,但大小絕對(duì)沒有10M以上,這個(gè)引用用空hash代替就不會(huì)出現(xiàn)out of memory
- 'tag_flow' => $phHash2, # 同上
- 'svg' => $xxxxx,
- 'only_diff' => $xxxxxx,
- 'ignore_group' => $xxxxxx,
- 'color' => {
- 'diff' => $xxxxx,
- 'add' => $xxxxxx,
- 'del' => $xxxxx,
- 'bckgrd' => $xxxxxx,
- },
- 'height' => $piHeight,
- 'width' => $piWidth,
- });
復(fù)制代碼 |
|