perhaps if -M is not otherwise set, 'getrlimit(RLIMIT_AS,..)' could be called and the maximum heap size set to just under that, since it is the point that the OS will forcefully kill the program anyway. John -- John Meacham - ⑆repetae.net⑆john⑈