Re: Using mutable array after an unsafeFreezeArray, and GC details

2014-05-12 Thread Simon Marlow
On 10/05/2014 21:57, Brandon Simmons wrote: Another silly question: when card-marking happens after a write or CAS, does that indicate this segment maybe contains old-to-new generation references, so be sure to preserve (scavenge?) them from collection ? Yes, that's exactly right. Cheers,

Re: Using mutable array after an unsafeFreezeArray, and GC details

2014-05-12 Thread Simon Marlow
On 09/05/2014 19:21, Brandon Simmons wrote: A couple of updates: Edward Yang responded here, confirming the sort of track I was thinking on: http://blog.ezyang.com/2014/05/ghc-and-mutable-arrays-a-dirty-little-secret/ And I can report that: 1) cloning a frozen array doesn't provide the

Re: Using mutable array after an unsafeFreezeArray, and GC details

2014-05-12 Thread Brandon Simmons
On Mon, May 12, 2014 at 4:32 AM, Simon Marlow marlo...@gmail.com wrote: On 09/05/2014 19:21, Brandon Simmons wrote: A couple of updates: Edward Yang responded here, confirming the sort of track I was thinking on: http://blog.ezyang.com/2014/05/ghc-and-mutable-arrays-a-dirty-little-secret/

Re: Using mutable array after an unsafeFreezeArray, and GC details

2014-05-12 Thread Edward Z . Yang
Excerpts from Brandon Simmons's message of 2014-05-10 13:57:40 -0700: Another silly question: when card-marking happens after a write or CAS, does that indicate this segment maybe contains old-to-new generation references, so be sure to preserve (scavenge?) them from collection ? In my initial