Hi,
Reuben Thomas wrote:
>
> > I have sucesfully compiled this file using ghc 5.02 under Linux. (It
> > takes about 5 minutes of wall clock time on a 500 MHz Pentium II,
> > which is...impressive...but it does at least compile succesfully).
>
> How much memory do you have under Linux? Perhaps it's the same machine...
I have 256MB + 128 MB of swap on the Linux box where it compiles succesfully.
I also just tried the test on my home Windows 2000 machine, which has 380 MB of
RAM and a total paging file size of 576 MB, and it *still* falls over (with the
illegal instruction dialog box).
> Well, I tried under Win XP, and ghc 5.02 went up to over 130Mb resident
> before conking out, so it looks as though the main problem is the amount of
> memory it's taking.
>
> By the way, I had to use nefarious means to get at your test archive, as
> your home directory is not world-readable.
Ooops, sorry about that. Now fixed.
> It doesn't look as though there's anything particularly nasty in
> HavenJavaBindings, so I suggest breaking the module into smaller chunks.
>
> The other thing to try is using +RTS -M ?? -RTS to ghc, so that the
> compacting collector is activated at some point.
Wow! That did the trick! Thanks!
Perhaps I'm being naieve, but I don't consider running until the heap is
exhausted and then crashing with an illegal instruction exception to be a
'correct' garbage-collected runtime. Why not either:
- wrap the low-level OS memory allocator in a function that will trigger a
garbage collection if any low-level heap allocation request fails (granted, this
might require a malloc() wrapper in the presense of external C or C++
libraries),
or
- as a lesser solution, keep track of the amount of memory allocated since the
last collection, and trigger a collection when more than X bytes have been
allocated since a collection occured? (~ 32 MB seems like a good rough guess)?
...Anyway, I am pleased to report that I just managed to succesfully compile and
run the Fruit prototype and the multi-view Paddleball game that I demo'ed at the
Haskell workshop under ghc 5.02 on Win32!
I had (since the Haskell workshop) already added a simple fix that sped up the
low-level calls to my Java-based graphics library considerably. The
ghc-compiled version of Paddleball is quite smooth...no jerky animation and no
problems keeping up with the mouse.
I will continue working to get this stuff in to some kind of releasable state.
thanks for your help,
-antony
--
Antony Courtney
Grad. Student, Dept. of Computer Science, Yale University
[EMAIL PROTECTED] http://www.apocalypse.org/pub/u/antony
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs