Date: Fri, 21 Nov 1997 15:22:01 -0600 (CST) From: Alex Nash <nash@Mcs.Net> To: Curtis Bray <cbray@best.com> Cc: freebsd-hackers@freebsd.org Subject: Re: malloc() problems in children after using rfork() Message-ID: <Pine.BSF.3.95.971121151935.2450J-100000@Jupiter.Mcs.Net> In-Reply-To: <3475E143.EE7AF250@best.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 21 Nov 1997, Curtis Bray wrote: > Hi, > > I'm trying to use rfork(RFPROC | RFMEM) so that all the children can > share the same address space with their parent. > > If I have multiple children issuing mallocs the children seem to core > dump. Once I turn the RFMEM flag off I have no problem mallocing (but > of course I loose the shared address space). Anyone know what I could > be doing wrong here? Do I have to put semaphores around every malloc?? > I hope that's not the case... Thanks in advance! The only locking malloc() performs is pthread_mutex_lock/unlock in the libc_r version. The non-threaded version provides no locking at all. Alex
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.971121151935.2450J-100000>