#698: GHC's internal memory allocator never releases memory back to the OS
---------------------------------+------------------------------------------
Reporter: guest | Owner: igloo
Type: bug | Status: new
Priority: low | Milestone: 6.12.3
Component: Runtime System | Version: 6.12.1
Keywords: | Difficulty: Moderate (less than a day)
Os: Unknown/Multiple | Testcase: N/A
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by igloo):
Replying to [comment:27 tinlix]:
> I have the following use case where it is important for the GC to free
memory.
> I have a huge matrix file which needs to be multiplied with a vector.
The matrix is 100Gb in size, so it's not possible to use matlab to do it.
>
> I used lazy string and thought I could use the readFile in
Data.ByteString.Lazy to read in the matrix one row at a time and do the
multiplication with the vector. The whole program just does a simple run
over the huge file. It turns out the program run out of memory as it goes
through the big file.
>
> Finally I have to go back to C++/STL which enables me to write a program
that takes constant memory and solves the problem fine.
>
> IMHO, this bug is serious. What a GC should provide, i.e. constant
memory consumption now becomes O(n). In a sense, this makes functions such
as readFile useless for serious use.
From your description, it sounds like your program has a space leak. This
ticket is not the problem: it is about the memory usage not dropping after
a peak, but you expect the memory usage to be constant, so won't have any
peaks.
I suggest you explain the problem, including the code, to the
[http://www.haskell.org/mailman/listinfo/haskell-cafe haskell-cafe mailing
list].
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/698#comment:28>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs