From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22568 invoked from network); 17 Aug 2020 19:51:19 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 17 Aug 2020 19:51:19 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 6D0A09CAB6; Tue, 18 Aug 2020 05:51:18 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 539FA9E176; Tue, 18 Aug 2020 05:50:36 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="DfLc14yy"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id F0D519CAB6; Tue, 18 Aug 2020 05:50:32 +1000 (AEST) Received: from mail-vk1-f193.google.com (mail-vk1-f193.google.com [209.85.221.193]) by minnie.tuhs.org (Postfix) with ESMTPS id D00DF9CAB3 for ; Tue, 18 Aug 2020 05:50:31 +1000 (AEST) Received: by mail-vk1-f193.google.com with SMTP id q72so3793930vkb.11 for ; Mon, 17 Aug 2020 12:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7mxkXCGt515wWgxmlR5g6pRADhQ/5/bmZyXgu527c4k=; b=DfLc14yyaZBU51flHYl+nM+FM1NogqlzJ67+XEMVznrXkMnNwsu+e6C6Dme4qYVJh2 qOb9EN7ApqKvmNG+/Cjl6rexwi4PKVl7XxHnaE+CdbqaUgb7hEkWVGFkQPmlFwpvu7Wc Vp8W25sH5KtSYFp9gndzFRbgqTdi7gUMp3gPYCMHSgGCriOajxsaHyP/OK5AAK+qdgYS eI9W2+MOK58PwWJdIAPGjfFtshtt9c/1OdJ8uBQH3KwKuFtNqegle4JqXtMqmbSMeWuh /Q0RgI508ku8SArQnvnT9Um4aDb5k5dGo/pTSMB+cF+nsJswVLrFV5g5/YO7klqzywoZ Qvyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7mxkXCGt515wWgxmlR5g6pRADhQ/5/bmZyXgu527c4k=; b=hyy7X9MPKZkw/5PII/Lcrfsd0RpKcdNx0x2V38MRgKTg7PF8W5RZr4LGRZRVHDvUUr 4ebC1RnbJ5VzTmIZPD3b+uNVML41SLTDvYWMIbJocueoneBO+GrdUpJMFyzV7mGxO1Pj otXRcf6F8XFlVof6+fE4/Opf36yKx2JAMGFNq/BAunEadciHysFw7DuGGrwMA0QhNj4g Gq97+ysw8KRCKY6Gtw+I1i9HE0cmUY8upQEgXFr2lzjDOhuqBKC/1OqQ/Cx/NbFM/pvW Lmsx0wPWRBbKg6LS7BTxF2uUdq0Wvfv+xU1BrLmlMHXxPqiW3a4TqdRnGGVRDuBFLomq xfbw== X-Gm-Message-State: AOAM533G/HdsDwYT5cYgg/dMOhdzUPz8lnybdyEae4F6zMBIdqnSpCRU al+0g+wEfGO/SF65Z44fmKuphtxJ6jHy4FNchUU= X-Google-Smtp-Source: ABdhPJwFYMmpgFZeAa3g04sueOwVJ8yNZM1xFlcku8cQIOH4VAyPS9cf0ZNB9dfxvP4Evy+skgDLnfh+VE9/dMZ/qdk= X-Received: by 2002:a1f:2e11:: with SMTP id u17mr9543656vku.6.1597693830628; Mon, 17 Aug 2020 12:50:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:48e9:0:0:0:0:0 with HTTP; Mon, 17 Aug 2020 12:50:29 -0700 (PDT) In-Reply-To: <20200817193050.GC11413@mcvoy.com> References: <20200817192715.22D9518C09E@mercury.lcs.mit.edu> <20200817193050.GC11413@mcvoy.com> From: Paul Winalski Date: Mon, 17 Aug 2020 15:50:29 -0400 Message-ID: To: Larry McVoy Content-Type: text/plain; charset="UTF-8" Subject: Re: [TUHS] Memory management in Dennis Ritchie's C Compiler X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tuhs@tuhs.org, Noel Chiappa Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On 8/17/20, Larry McVoy wrote: > On Mon, Aug 17, 2020 at 03:27:15PM -0400, Noel Chiappa wrote: [regarding mmap(2)] > > Bill Joy imagined it, the prototype is in one the 4.x BSD releases. > Sun (Joe Moran) actually implemented it first in any Unix variant. > It's possible the concept existed in some other OS but I'm not aware > of it. > VAX/VMS had the equivalent of mmap(2) back in 1978. You can specify a range of contiguous pages in virtual memory and associate that with a (page-aligned) range of blocks in a file. The blocks in the file act as backing store for the virtual memory. VMS also has a system call $CRETVA (create virtual address space) that lets you associate a VA range using the system page file as backing store. The VMS image activator (runtime loader in Unix-speak) used these primitives to load program images into virtual memory. More than one process can map the same region of a file. This is how sharing of read-only program segments such as .text is implemented. I think Burroughs OSes had this concept even before VMS. There is also $EXPREG (expand address region), which is more or less equivalent to sbrk(). -Paul W.