XL/erasure: Reset dataBlocks to reduce the memory usage. (#1749)

Fixes #1748
This commit is contained in:
Harshavardhana
2016-05-24 19:25:51 -07:00
committed by Harshavardhana
parent 1e393c6c5b
commit a97230dd56
2 changed files with 4 additions and 2 deletions

View File

@@ -17,8 +17,7 @@
package main
// getDataBlocks - fetches the data block only part of the input encoded blocks.
func getDataBlocks(enBlocks [][]byte, dataBlocks int, curBlockSize int) []byte {
var data []byte
func getDataBlocks(enBlocks [][]byte, dataBlocks int, curBlockSize int) (data []byte) {
for _, block := range enBlocks[:dataBlocks] {
data = append(data, block...)
}