From owner-freebsd-current Sun Sep 20 08:41:42 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA10119 for freebsd-current-outgoing; Sun, 20 Sep 1998 08:41:42 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA10109 for ; Sun, 20 Sep 1998 08:41:37 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by nlsystems.com (8.9.1/8.8.5) with SMTP id PAA29254; Sun, 20 Sep 1998 15:37:41 GMT Date: Sun, 20 Sep 1998 16:37:41 +0100 (BST) From: Doug Rabson To: Poul-Henning Kamp cc: current@FreeBSD.ORG Subject: Re: vfork and malloc In-Reply-To: <12755.906302086@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 20 Sep 1998, Poul-Henning Kamp wrote: > In message , 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