From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753591AbXCTSNK (ORCPT ); Tue, 20 Mar 2007 14:13:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753576AbXCTSNK (ORCPT ); Tue, 20 Mar 2007 14:13:10 -0400 Received: from gw.goop.org ([64.81.55.164]:36471 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752683AbXCTSNJ (ORCPT ); Tue, 20 Mar 2007 14:13:09 -0400 Message-ID: <460023F1.8060102@goop.org> Date: Tue, 20 Mar 2007 11:12:01 -0700 From: Jeremy Fitzhardinge User-Agent: Thunderbird 1.5.0.10 (X11/20070302) MIME-Version: 1.0 To: "Ravinandan Arakali (rarakali)" CC: Linux Kernel Subject: Re: Multiple instances of program sharing same text segment ? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Ravinandan Arakali (rarakali) wrote: > I note that do_exec calls do_mmap to map the executable file to memory. > But not sure what happens(w.r.t text sharing) when another instance of > the program is invoked. BTW, this is 2.6.10. Yes, they will be shared. As far as the rest of the kernel is concerned, an mmap is an mmap is an mmap, and the pages will be shared. J