I've been looking at memory errors in perl, and found that if DL_UNLOAD_ALL_AT_EXIT is defined, it causes heap problems on exit. The cause is that the AV holding the references to the dlopen() handles has been reclaimed before the perl atexit processing takes place to dlclose() the handles. I could fix this by keeping a list of the dlopen handles locally in DynaLoader.xs, but I think there is a more general problem here - what use is perl_atexit() if it is called after globals have been destroyed? -- Alan BurlisonThread Next