Date: Sun, 20 Sep 1998 16:37:41 +0100 (BST) From: Doug Rabson <dfr@nlsystems.com> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: current@FreeBSD.ORG Subject: Re: vfork and malloc Message-ID: <Pine.BSF.4.01.9809201635420.28425-100000@herring.nlsystems.com> In-Reply-To: <12755.906302086@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 20 Sep 1998, Poul-Henning Kamp wrote: > In message <Pine.BSF.4.01.9809201458240.28425-100000@herring.nlsystems.com>, Do > ug Rabson writes: > > >Is it safe to call malloc in the child process after a vfork? I have been > >trying to debug a rare fault in make which goes away when I change the > >vfork() in src/usr.bin/make/compat.c to fork(). After the vfork, it calls > >execvp() which allocates memory via strdup(). > > It may not be safe to do if the mmap(2)'ed area used for the page table > isn't also shared at that time. It turns out that malloc was using the default pagesize (4096) for the alpha instead of 8192. I'm trying again with the correct pagesize for malloc which would be a better fix if it works. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891 Fax: +44 181 381 1039 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.01.9809201635420.28425-100000>