Ticket #22 (closed defect: invalid)
Excessive memory allocation when using mutable vectors
| Reported by: | babusri | Owned by: | |
|---|---|---|---|
| Priority: | critical | Milestone: | 0.7.1 |
| Version: | 0.6 | Keywords: | |
| Cc: |
Description
With the length of the mutable vector fixed, I expected that the memory allocated on the heap wouldn't increase with number of vector operations performed. But I see a linear increase. I think I am not using the vector package properly. I didn't see an option to ask a question and so I am raising it here.
I asked this question in the irc (http://hpaste.org/fastcgi/hpaste.fcgi/view?id=25743) and copumpkin asked me to use Data.Vector.Unboxed.Mutable instead of Data.Vector.Mutable. It improved the bytes copied during gc, but not memory allocation. For e.g. if I duplicate the replicateM_ line, memory allocation doubles.
