#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              
---------------------------------+------------------------------------------
Changes (by tinlix):

  * version:  6.4.1 => 6.12.1


Comment:

 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.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/698#comment:27>
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

Reply via email to