[Haskell-cafe] possible memory leak in uvector

Manlio Perillo manlio_perillo at libero.it
Thu Mar 5 06:30:13 EST 2009

Bulat Ziganshin ha scritto:
> Hello Manlio,
> Tuesday, March 3, 2009, 5:35:33 PM, you wrote:
>> There are 100,000,000 ratings, so I create 100,000,000 arrays containing
>> only one element.
> every array needs ~30 bytes - it's a minimal memory block ghc can
> alloc for variable-sized objects. multiple this by 3 to account for
> copying GC behavior

Ok, this explains memory usage; thanks.

IMHO, this informations should go in the wiki; they may be insignificant 
for normal applications, but when one starts to deal with huge amount of 
data, 10 bytes per item make an important difference.

Manlio Perillo

More information about the Haskell-Cafe mailing list