Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site sdcsvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!qantel!hplabs!sdcrdcf!sdcsvax!brian From: brian@sdcsvax.UUCP (Brian Kantor) Newsgroups: net.unix-wizards Subject: sendmail alias processing out of memory 2.9BSD PDP-11/70 Message-ID: <1122@sdcsvax.UUCP> Date: Tue, 1-Oct-85 19:11:59 EDT Article-I.D.: sdcsvax.1122 Posted: Tue Oct 1 19:11:59 1985 Date-Received: Mon, 7-Oct-85 03:07:45 EDT Organization: UCSD wombat breeding society Lines: 39 Keywords: sendmail 2.9bsd memory Problem: Sendmail -bi reports out of memory - not enough core when trying to build the /usr/lib/aliases.{dir,pag} files from /usr/lib/aliases. PDP-11/70 running Berkeley 2.9BSD Repeat-by: feeding sendmail a /usr/lib/aliases file that has more than 400 or so aliases. Cause: sendmail's parseaddr routine mallocs space to return parts of the addresses being parsed attached to pointers supplied. Nobody ever returns this malloc'd space, so the process runs out of core. (note: you must have DBM defined in conf.h. If not, the symbol table will run out of memory much sooner). Cure: in /usr/src/usr.lib/sendmail/src/alias.c Change the call to parseaddr to return less information when parsing the left hand address of the alias: if (parseaddr(line, &al, 0, ':') == NULL) And add a few lines to free up the space malloc'd in parseaddr. store(key, content); /* free up the alloc'd memory so our poor little PDP-11 doesn't run out of memory */ free(al.q_user); al.q_user = NULL; } ------ Brian Kantor UC San Diego decvax\ brian@ucsd.arpa akgua >--- sdcsvax --- brian ucbvax/ Kantor@Nosc