[mercury-users] BoehmGC: Exclusion ranges overlap
jonmmorgan at gmail.com
Fri Mar 3 10:09:07 AEDT 2006
I was getting a wierd error yesterday on the Computer Science (Solaris)
servers, using mercury-0.12.2.
My application would build properly, but the following (borrowed from
mtcltk) caused it to abort, saying exclusion ranges overlap. This seems to
be related to BoehmGC. Is there anything wrong with the way I am using
this, or is it just no longer necessary? It seems to work allright with Tk.
:- pragma foreign_code("C", "
** The addresses of the closures that we pass to Tk
** will be stored by Tk in malloc()'ed memory.
** However, it is essential that these pointers be
** visible to the garbage collector, otherwise it will
** think that the closures are unreferenced and reuse the storage.
** Hence we redefine malloc() and friends to call GC_malloc().
void *malloc(size_t s)
void *calloc(size_t s, size_t n)
t = GC_MALLOC(s*n);
memset(t, 0, s*n);
void *realloc(void *ptr, size_t s)
return GC_REALLOC(ptr, s);
void free(void *ptr)
#endif /* MR_CONSERVATIVE_GC */
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users