ERROR: Too many ForeignObjs open

Sigbjorn Finne sigbjorn_finne@hotmail.com
Fri, 1 Dec 2000 11:03:52 +0100


Koen Claessen koen@.cs.chalmers.se writes:
> 
> Playing around with H/Direct, I often get the error:
> 
>   ERROR: Too many ForeignObjs open
> 
> I think that in my case, a simple garbage collect would get
> rid of a lot of these foreign objects. Is this true? In
> other words: would a garbage collect just before this error
> is generated help?

Yes, it often will & the code already does this if there are no
more empty slots in the table (by default, the table size is 10000
in a large Hugs configuration.)

Exhausting that limit is in my experience a sign that you're
accidentally holding on to too much external state (maybe
at a too fine-grained a level -- this was an issue in an earlier
version of the Com support libraries, for instance.) If you
need to have that many FOs live, upping the limit & recompiling
Hugs is the only way around the problem.

--sigbjorn