From owner-freebsd-hackers Tue Feb 27 13:25:16 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from nebula.cybercable.fr (d217.dhcp212-126.cybercable.fr [212.198.126.217]) by hub.freebsd.org (Postfix) with ESMTP id D5D6537B718 for ; Tue, 27 Feb 2001 13:25:10 -0800 (PST) (envelope-from mux@qualys.com) Received: (from mux@localhost) by nebula.cybercable.fr (8.11.2/8.11.2) id f1RLOsd02437; Tue, 27 Feb 2001 22:24:54 +0100 (CET) (envelope-from mux) Date: Tue, 27 Feb 2001 22:24:54 +0100 From: Maxime Henrion To: hackers@freebsd.org Cc: Tony Finch Subject: Re: [hackers] Re: Setting memory allocators for library functions. Message-ID: <20010227222454.G345@nebula.cybercable.fr> References: <20010227202234.K609@hand.dotat.at> <200102272044.f1RKi0n13690@chopper.Poohsticks.ORG> <20010227211215.M609@hand.dotat.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010227211215.M609@hand.dotat.at>; from dot@dotat.at on Tue, Feb 27, 2001 at 09:12:15PM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Tony Finch wrote: > Drew Eckhardt wrote: > >In message <20010227202234.K609@hand.dotat.at>, dot@dotat.at writes: > >>In most cases it is impossible to declare the data read-only because > >>it originally had to be read-write and you can't change its attributes > >>later. > > > >mprotect(2). > > If it's available at all, mprotect() is often limited to memory > obtained with mmap(), i.e. not malloc(). Not great for portability. FreeBSD malloc() calls mmap() as AFAIK many (if not all) malloc() implementations. Maxime -- Don't be fooled by cheap finnish imitations ; BSD is the One True Code Key fingerprint = F9B6 1D5A 4963 331C 88FC CA6A AB50 1EF2 8CBE 99D6 Public Key : http://www.epita.fr/~henrio_m/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message