Path: ...!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail From: John Levine Newsgroups: comp.arch Subject: Re: C and turtles, 80286 protected mode Date: Wed, 16 Oct 2024 03:09:59 -0000 (UTC) Organization: Taughannock Networks Message-ID: References: <2024Oct6.150415@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 16 Oct 2024 03:09:59 -0000 (UTC) Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="27705"; mail-complaints-to="abuse@iecc.com" In-Reply-To: <2024Oct6.150415@mips.complang.tuwien.ac.at> Cleverness: some X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: johnl@iecc.com (John Levine) Bytes: 2135 Lines: 21 According to MitchAlsup1 : >> It's easy enough to write malloc() in standard C if your flavor of the >> standard includes a way to ask the operating system for heap space. >> Back in the old days it was sbrk(). Now it's mmap(MAP_ANON). >> >> But I would be quite surprised if either of those ever made it into >> any version of standard C. > >sbrk() was in the std. library on PDP-11/70 that I used 1982. It was in the library on the PDP-11/45 I used in 1976, too, but the C library was whatever was in the C library, a mix of Unix system calls and other stuff. The first C standard wasn't published until 1985. In 1976 I also wrote C code that ran on an 11/05 that controlled some early bitmap terminals. It didn't have sbrk() becasue there wasn't an operating system underneath. -- Regards, John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies", Please consider the environment before reading this e-mail. https://jl.ly