Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Nov 1997 19:54:53 -0600 (CST)
From:      nash@mcs.net
To:        julian@whistle.com
Cc:        cbray@best.com, freebsd-hackers@FreeBSD.ORG
Subject:   Re: malloc() problems in children after using rfork()
Message-ID:  <199711220154.TAA05968@zen.nash.org>
In-Reply-To: <34762398.1CFBAE39@whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 21 Nov, Julian Elischer wrote:
>> The only locking malloc() performs is pthread_mutex_lock/unlock in the
>> libc_r version.  The non-threaded version provides no locking at all.
[...]
> I just saw the other email
> 
> he's using 2.2.5
> rfmem don't work in 2.2.x.
> well it DOES but it only shares EXISTING memory.
> new allocations are not shared..

and in a subsequent email...

> New allocations from the kernel (done after the rfork)
> are not shared..
> this was fixed in -current but I'm pretty sure john has not back-ported
> it.

Unless I'm missing something, even if the fix was brought into -stable
it still won't allow multiple rforked(RFMEM|RFPROC) processes to malloc
out of a shared data segment (without locking, of course).

Alex





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711220154.TAA05968>