Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

19 May, 2024: Line wrapping has been changed to be more consistent with Usenet standards.
 If you find that it is broken please let me know here rocksolid.nodes.help


devel / comp.arch / Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

SubjectAuthor
* On the pitfalls of C and UB: C23 seems to be even worse. :-(Terje Mathisen
+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
|+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
|| +- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
|| `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(David Brown
|+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Bill Findlay
||`- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
|+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Anton Ertl
||+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Niklas Holsti
|||`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Michael S
||| +* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Michael S
||| |`- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Niklas Holsti
||| +* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Niklas Holsti
||| |`- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Jean-Marc Bourguet
||| `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
||+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
|||`- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(David Brown
|| +* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Terje Mathisen
|| |+- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Michael S
|| |+- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(David Brown
|| |`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Tim Rentsch
|| | `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(chrisq
|| |  `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Tim Rentsch
|| `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Anton Ertl
||  +* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||  |+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Anton Ertl
||  ||`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||  || `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Tim Rentsch
||  ||  `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||  ||   `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Tim Rentsch
||  |`- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(BGB
||  `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(David Brown
||   `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Anton Ertl
||    +* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Michael S
||    |+- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Michael S
||    |+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Niklas Holsti
||    ||+- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Michael S
||    ||`- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Thomas Koenig
||    |`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Anton Ertl
||    | +* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |+- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Michael S
||    | |`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(BGB
||    | | +- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(robf...@gmail.com
||    | | `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  +* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(robf...@gmail.com
||    | |  |+- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(David Brown
||    | |  |+- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
||    | |  |+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  ||`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Timothy McCaffrey
||    | |  || +- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  || `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(David Brown
||    | |  |`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Thomas Koenig
||    | |  | +- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(BGB
||    | |  | +* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
||    | |  | |`- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Thomas Koenig
||    | |  | `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(John Dallman
||    | |  |  `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Thomas Koenig
||    | |  |   `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
||    | |  |    `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(EricP
||    | |  |     `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  |      `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(EricP
||    | |  |       `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  +* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(BGB
||    | |  |+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  ||+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
||    | |  |||+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Terje Mathisen
||    | |  ||||`- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
||    | |  |||+- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Timothy McCaffrey
||    | |  |||+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Timothy McCaffrey
||    | |  ||||`- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Stephen Fuld
||    | |  |||+- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Stephen Fuld
||    | |  |||`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  ||| +- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(BGB
||    | |  ||| `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
||    | |  |||  `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  ||`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(BGB
||    | |  || +* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  || |`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(BGB
||    | |  || | `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  || |  +- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
||    | |  || |  `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Terje Mathisen
||    | |  || |   `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(BGB
||    | |  || `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(John Dallman
||    | |  ||  `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(BGB
||    | |  ||   +* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  ||   |+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Terje Mathisen
||    | |  ||   ||`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  ||   || `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Terje Mathisen
||    | |  ||   |+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(BGB
||    | |  ||   ||+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  ||   |||+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
||    | |  ||   ||||`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  ||   |||| `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
||    | |  ||   |||`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Tim Rentsch
||    | |  ||   ||| `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(chrisq
||    | |  ||   ||`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
||    | |  ||   || `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(BGB
||    | |  ||   ||  `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Stephen Fuld
||    | |  ||   ||   `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Scott Lurndal
||    | |  ||   |`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Thomas Koenig
||    | |  ||   `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(John Dallman
||    | |  |`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
||    | |  `* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(MitchAlsup
||    | +- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Michael S
||    | `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Thomas Koenig
||    +- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(David Brown
||    `- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Mike Stump
|+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Thomas Koenig
|`- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(John Dallman
+* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Andy Valencia
+- Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Thomas Koenig
+* Re: C !!num idiom [was On the pitfalls of C and UB: C23 seems toEricP
`* Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(Peter Lund

Pages:123456789
Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<u14a94$2mo98$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31642&group=comp.arch#31642

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Date: Tue, 11 Apr 2023 13:52:12 -0500
Organization: A noiseless patient Spider
Lines: 125
Message-ID: <u14a94$2mo98$1@dont-email.me>
References: <u0f6gf$32irr$1@dont-email.me>
<2023Apr4.073909@mips.complang.tuwien.ac.at> <u10pbe$259vd$1@dont-email.me>
<2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me>
<2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com>
<2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
<EUgZL.2295552$vBI8.1111497@fx15.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Apr 2023 18:52:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a6a4710ef1de506fa195e36e24a90235";
logging-data="2842920"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+Ai3nPqvS0tqDdQKJ2vre"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Cancel-Lock: sha1:yKj+FySV0PhJH/oDKSQ5NAd5WNA=
In-Reply-To: <EUgZL.2295552$vBI8.1111497@fx15.iad>
Content-Language: en-US
 by: BGB - Tue, 11 Apr 2023 18:52 UTC

On 4/11/2023 12:36 PM, Scott Lurndal wrote:
> BGB <cr88192@gmail.com> writes:
>> On 4/11/2023 8:32 AM, Scott Lurndal wrote:
>>> BGB <cr88192@gmail.com> writes:
>>>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:
>>>>> anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>>>>> Michael S <already5chosen@yahoo.com> writes:
>>>
>>>> This being partly because:
>>>> Variable size stack frames are evil;
>>>> If one excludes large allocations from the stack (including large
>>>> arrays), one may find that 128k of stack space is sufficient for most
>>>> programs.
>>>
>>> It's not 1989 anymore.
>>>
>>
>> ?...
>>
>> AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?...
>
> The VAX had a 32-bit flat address space in 1978[*]. The i386 had one by 1985.
>

But, the actual transition to 32 bits didn't really happen until the
Win9X era in the late 1990s... (even if the i386 and i486 existed
sooner, and games like Doom and similar made use of them).

When I switched to XP X64, it was sort of a sad send-off for the
remaining programs I only had in 16-bit forms. Can still run them in
emulators, but then they can't access the native filesystem, limiting
their usefulness. Granted, most of these programs were also limited to
8.3 filenames, so it arguably wasn't a huge loss...

Also, when I first started learning C, it was in the context of a C
compiler that mostly only targeted MS-DOS and Win16.

Granted, I soon ended up jumping to Cygwin, which targeted native Win32,
once the limitations of 16-bit DOS and Win16 programming became more
apparent (also around the time I did the Win95 to WinNT jump).

Similarly, despite x86-64 coming out when I was in high-school, the
general move to 64-bit Windows didn't really fully happen until Windows
10, where many people with Windows 7 installs were still using 32-bit
versions.

And, even now, one still sees a lot of 32-bit processes in Task Manager
and similar.

> Not to mention the dozens of mainframe and minicomputers available with
> large memory spaces from the last 1960s.
>
> [*] Although in 1979, 4MB was a large amount of physical memory, VMS
> had working sets and paging, as did the 370 successors and most other
> mainframe lines. Even the PDP-10 had 256k words (36-bit) of magnetic
> core memory.

Yeah, these weren't really anything I had seen.

Had seen a video recently where someone was trying to get a late 70s
PDP-11 working. Externally, it could have almost been passed off as late
80s tech, except when the case was taken off, things got a bit weird.

Seemingly, the "beige box era" started a little earlier than I would
have thought. Also a complete absence of bright funky colors, tie die
patterns, wood-grain, or lava-lamps, as usually associated with that
era. Then again, it seems like beige/brown/etc were common colors for
clothing and carpet and similar (based on TV/etc), so maybe its use on
computers wasn't that far off.

I guess, beige box era started to end when PCs started to do white and
gray and similar. Then pretty much everyone settled on black by the
mid/late 2000s (until present).

And, with my FPGA project, I am currently using an old beige PS/2
mechanical keyboard, as this was the only one I could get to work in my
case (on 3.3v).

Where, say, keyboard eras:
Old: DIN-5, no F11 or F12 or cursor keys;
Don't have anything this old.
Medium old:
DIN-5 or PS/2, no "Windows key" or similar;
Slightly less old:
PS/2, has Windows key but little else "funky";
Slightly Later:
PS/2, pointless web-browsing related keys and similar
Say, one has keys with the Internet Explorer and MS Outlook icons;
...
Newer still:
USB, web keys are gone, mostly replaced by media player keys.

Had discovered there is apparently supposed to be a feature with many
USB keyboards and mice, that if both D+ and D- are pulled high by the
host, they switch back to behaving like a PS/2 device.

I had a USB keyboard I had used previously (old FPGA board had a USB ->
PS/2 translator chip), but this trick does not appear to work with it.

Curiously, it does seem to work with an optical mouse. Could almost add
this as a feature to my USB interface module, but would need to use two
more IO pins for pull-up / pull-down control for each USB port.

But, I guess I could also do it externally via a switch, and maybe add
something to my Verilog code to detect that the port is held in the '11'
link state and then enable a PS2 interface for the pins (possibly MUXed
with the dedicated PS/2 port pins; TBD).

Still have not had much luck getting "actual" USB working.
I suspect I am still missing something here.

....

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<u14aqg$2mpdt$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31643&group=comp.arch#31643

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: terje.ma...@tmsw.no (Terje Mathisen)
Newsgroups: comp.arch
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Date: Tue, 11 Apr 2023 21:01:36 +0200
Organization: A noiseless patient Spider
Lines: 62
Message-ID: <u14aqg$2mpdt$1@dont-email.me>
References: <u0f6gf$32irr$1@dont-email.me>
<2023Apr4.073909@mips.complang.tuwien.ac.at> <u10pbe$259vd$1@dont-email.me>
<2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me>
<2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com>
<2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
<EUgZL.2295552$vBI8.1111497@fx15.iad>
<a85d3e0c-e0fd-4569-b7c9-2779ab298849n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 11 Apr 2023 19:01:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1919e75c69f95d1359ad61ac450dad13";
logging-data="2844093"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186tcr3B/b6Un6RToJXaszanoS57mV2vCH+7vRzyJylMQ=="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.16
Cancel-Lock: sha1:LG50LWrwCQ1wcluLkFwaQT7j3NY=
In-Reply-To: <a85d3e0c-e0fd-4569-b7c9-2779ab298849n@googlegroups.com>
 by: Terje Mathisen - Tue, 11 Apr 2023 19:01 UTC

MitchAlsup wrote:
> On Tuesday, April 11, 2023 at 12:36:39 PM UTC-5, Scott Lurndal wrote:
>> BGB <cr8...@gmail.com> writes:
>>> On 4/11/2023 8:32 AM, Scott Lurndal wrote:
>>>> BGB <cr8...@gmail.com> writes:
>>>>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:
>>>>>> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>>>>>> Michael S <already...@yahoo.com> writes:
>>>>
>>>>> This being partly because:
>>>>> Variable size stack frames are evil;
>>>>> If one excludes large allocations from the stack (including large
>>>>> arrays), one may find that 128k of stack space is sufficient for most
>>>>> programs.
>>>>
>>>> It's not 1989 anymore.
>>>>
>>>
>>> ?...
>>>
>>> AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?...
>> The VAX had a 32-bit flat address space in 1978[*]. The i386 had one by 1985.
>>
>> Not to mention the dozens of mainframe and minicomputers available with
>> large memory spaces from the last 1960s.
> <
> CDC 6600, 7600, CRAY 1, 1S, XMP, YMP,
> IBM 360s, 370s, 30x0s,
> Univac 1108,
> S.E.L., InterData 32,
> PDP 6, PDP 10, PDP 11, VAX, Alpha,
> All RISC architectures,
> :: all had flat address spaces.
>>
>> [*] Although in 1979, 4MB was a large amount of physical memory, VMS
>> had working sets and paging, as did the 370 successors and most other
>> mainframe lines. Even the PDP-10 had 256k words (36-bit) of magnetic
>> core memory.
> <
> When I bought my first computer in 1995, It came with 4 MB, and after using
> it for 2 days, I went out and bought 16MB more. Since windows 3.1 did not
> use more than 16 MB, I configured the other 4MB as the disk cache, and
> turned off the swapper. My 33 MHz 486 outran my wife's 100 MHz Pentium.

I let my father-in-law buy me a pair of Columbia PC clones in 1982, I
then used them to develop software for his downtown Oslo business.

These were really beefy machines with 256 or 384 kB RAM, one of them
even had a 10 MB hard drive in addition to the 5.25" floppy drive.

> <
> The real question is why anyone would want something other than a large flat
> address space ??
>
It rather seems like a solved problem, just like 2's complement binary
integers.

Terje

--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<1c056a26-8847-4b79-8dd4-5e89d37b3c1fn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31644&group=comp.arch#31644

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:45a4:b0:748:720e:9002 with SMTP id bp36-20020a05620a45a400b00748720e9002mr21341qkb.9.1681241868962;
Tue, 11 Apr 2023 12:37:48 -0700 (PDT)
X-Received: by 2002:a05:6870:3307:b0:180:2a9f:1ac1 with SMTP id
x7-20020a056870330700b001802a9f1ac1mr1911717oae.2.1681241868740; Tue, 11 Apr
2023 12:37:48 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 11 Apr 2023 12:37:48 -0700 (PDT)
In-Reply-To: <a85d3e0c-e0fd-4569-b7c9-2779ab298849n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=71.230.96.169; posting-account=ujX_IwoAAACu0_cef9hMHeR8g0ZYDNHh
NNTP-Posting-Host: 71.230.96.169
References: <u0f6gf$32irr$1@dont-email.me> <2023Apr4.073909@mips.complang.tuwien.ac.at>
<u10pbe$259vd$1@dont-email.me> <2023Apr10.143646@mips.complang.tuwien.ac.at>
<u118f4$27ckk$1@dont-email.me> <2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com> <2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
<EUgZL.2295552$vBI8.1111497@fx15.iad> <a85d3e0c-e0fd-4569-b7c9-2779ab298849n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1c056a26-8847-4b79-8dd4-5e89d37b3c1fn@googlegroups.com>
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
From: timcaff...@aol.com (Timothy McCaffrey)
Injection-Date: Tue, 11 Apr 2023 19:37:48 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2709
 by: Timothy McCaffrey - Tue, 11 Apr 2023 19:37 UTC

On Tuesday, April 11, 2023 at 1:55:49 PM UTC-4, MitchAlsup wrote:

> The real question is why anyone would want something other than a large flat
> address space ??

When you have worked on a system that basically does sanity checking *all the time*
you really miss it when you start working on "shoot yourself in the foot" C programming boxes.

It was great getting a log from the customer that told where/what the problem was.
Most of the time, it was all I needed to figure out (and fix) the problem.

With C, you get a segfault (if you're lucky), probably down in some unrelated function and
long after the real problem happened. (Yes, I know there are better languages out there
now).

Many years ago we had a product that transitioned from real-mode to protected-mode
on 16 bit x86. There was an amazing number errors discovered during the process.
I suspect it would be the same with much of today's code.

- Tim

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<ff347edb-e5d1-42f0-9cc4-b95778c26cd7n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31645&group=comp.arch#31645

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:179e:b0:744:aac7:6421 with SMTP id ay30-20020a05620a179e00b00744aac76421mr4052617qkb.5.1681242679951;
Tue, 11 Apr 2023 12:51:19 -0700 (PDT)
X-Received: by 2002:a05:6870:11:b0:183:fc80:7361 with SMTP id
a17-20020a056870001100b00183fc807361mr16710oaa.4.1681242679677; Tue, 11 Apr
2023 12:51:19 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 11 Apr 2023 12:51:19 -0700 (PDT)
In-Reply-To: <a85d3e0c-e0fd-4569-b7c9-2779ab298849n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=71.230.96.169; posting-account=ujX_IwoAAACu0_cef9hMHeR8g0ZYDNHh
NNTP-Posting-Host: 71.230.96.169
References: <u0f6gf$32irr$1@dont-email.me> <2023Apr4.073909@mips.complang.tuwien.ac.at>
<u10pbe$259vd$1@dont-email.me> <2023Apr10.143646@mips.complang.tuwien.ac.at>
<u118f4$27ckk$1@dont-email.me> <2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com> <2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
<EUgZL.2295552$vBI8.1111497@fx15.iad> <a85d3e0c-e0fd-4569-b7c9-2779ab298849n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ff347edb-e5d1-42f0-9cc4-b95778c26cd7n@googlegroups.com>
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
From: timcaff...@aol.com (Timothy McCaffrey)
Injection-Date: Tue, 11 Apr 2023 19:51:19 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2932
 by: Timothy McCaffrey - Tue, 11 Apr 2023 19:51 UTC

On Tuesday, April 11, 2023 at 1:55:49 PM UTC-4, MitchAlsup wrote:

> > Not to mention the dozens of mainframe and minicomputers available with
> > large memory spaces from the last 1960s.
> <
> CDC 6600, 7600, CRAY 1, 1S, XMP, YMP,

CDC 180 series was segment/selector/descriptor based (they had a 6000 series emulation mode).

> IBM 360s, 370s, 30x0s,
> Univac 1108,

I believe the Univac 2200 expanded the address space by adding something similar to 386 protected mode segments/selectors.

> S.E.L., InterData 32,
> PDP 6, PDP 10, PDP 11, VAX, Alpha,

You didn't mention DG Nova, but the follow-on processors added segment/selectors (if I remember "Soul of a New Machine" correctly).

> All RISC architectures,
> :: all had flat address spaces.

I believe the Honeywell/GE systems (at least the ones used for Multics) used segment/selectors (i.e. 386 protected mode like).

Prime, a big name late 70s, early 80s, I think built something very similar to the Honeywell box.

The HP 3000 mini computer architecture (70s..80s) used the Burroughs large system as inspiration, so the address space was not flat.

- Tim

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<u14fk5$2n42n$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31646&group=comp.arch#31646

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Date: Tue, 11 Apr 2023 15:23:25 -0500
Organization: A noiseless patient Spider
Lines: 215
Message-ID: <u14fk5$2n42n$1@dont-email.me>
References: <u0f6gf$32irr$1@dont-email.me>
<a533d5c4-8dca-44eb-ba43-bf38ab7f9f34n@googlegroups.com>
<2023Apr4.073909@mips.complang.tuwien.ac.at> <u10pbe$259vd$1@dont-email.me>
<2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me>
<2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com>
<2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
<1576a6c6-e119-4368-8232-5f22dbc84416n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 11 Apr 2023 20:23:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a6a4710ef1de506fa195e36e24a90235";
logging-data="2854999"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19PuX5JmD4qGsJWE9R5rD4d"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Cancel-Lock: sha1:cm6Uc4BSTmrMa5OHRfr/faZT8jk=
Content-Language: en-US
In-Reply-To: <1576a6c6-e119-4368-8232-5f22dbc84416n@googlegroups.com>
 by: BGB - Tue, 11 Apr 2023 20:23 UTC

On 4/11/2023 12:47 PM, MitchAlsup wrote:
> On Tuesday, April 11, 2023 at 12:24:46 PM UTC-5, BGB wrote:
>> On 4/11/2023 8:32 AM, Scott Lurndal wrote:
>>> BGB <cr8...@gmail.com> writes:
>>>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:
>>>>> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>>>>> Michael S <already...@yahoo.com> writes:
>>>
>>>> This being partly because:
>>>> Variable size stack frames are evil;
>>>> If one excludes large allocations from the stack (including large
>>>> arrays), one may find that 128k of stack space is sufficient for most
>>>> programs.
>>>
>>> It's not 1989 anymore.
>>>
>> ?...
>>
>> AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?...
>>
>> Where, say:
>> CS, program;
>> DS = SS, global variables and stack.
>> Also heap for "small" or "tiny" model.
>> ES, stomped for sake of "far" pointers.
> <
> You mean 1995...............

I started learning C in the mid/late 90s, and this stuff was still around.

However, I soon realized "16-bit sucks" and jumped over to Cygwin...

My PC at the time was IIRC a 486 DX2-66.

>>
>> Comparably, 128K is massive...
>>
> But 16GB is standard today. 128K× BIGGER.

??? !

I was pretty sure it was still 1MB for Windows, 8MB for Linux.
Yes, in 64-bit processes.

> <
>>
>> I have tested, and a lot of stuff does not work with a 16K or 32K stack,
>> whereas 64K is borderline (say, Doom works, but Quake overflows the stack).
>>
>> Meanwhile, 128K usually works, and 256K if one "wants to be safe".
> <
> Why not just let the stack grow to whatever size it needs to be.
> It is relatively easy to put SP = 0x7FFFFFFFFFFFFFFF0 and
> ..................................... heap = 0x40000000000000000 and
> never run out of either. (2^62-bit virtual range.)
> <
> Virtual memory works, and hides the complexities of doing it the easy way.
> <

Last I checked, the OS's generally use 40 or 48 bits of virtual address
space.

On BJX2, one could still probably have multi-GB stacks in virtual
memory, but I am not sure I see much point.

A 1MB stack being sufficient is nearly universal.

It is mostly when one goes smaller that annoyances start popping up, but
practically, apart from code occasionally trying to put an oversize
array on the stack, 128K or similar is sufficient.

If virtual memory were more proven in my case, "sure, why not use 1MB?...".

Practically, it means needing to figure out the "SDcard CRC or whatever"
situation (so, one can write blocks to the SDcard without it being like
"hahaha, no").

Otherwise, stuff was "mostly working" on the otherwise read-only access
to the SDcard.

>> Windows typically uses 1MB for the stack, but this seems overkill IME,
>> and also Windows always operates with virtual memory enabled.
>>
> My architecture comes out of reset with the MMUs turned on and working.
> Why would you not want virtual memory enabled ??

Dealing with page-tables and/or TLB Miss handling at boot time seems
like needless issues.

As for why it isn't enabled by default post boot:
For a while, I was stuck with debugging virtual memory enough that
turning it on didn't cause significant reliability issues (such as
freezing or crashing due to TLB miss ISRs).

This is now mostly stable, but I had the "enable virtual memory" code
keyed to the "is there a pagefile?" handling.

But, trying to use a page-file when the underlying media is effectively
read-only, doesn't work out so well...

Could potentially add some "check if we can actually read-write to the
page-file, and disable swap, while otherwise leaving virtual memory
enabled" logic, but have not done so.

There is handling (and an address range for) "virtual memory but
directly mapped to underlying physical memory".

However, the way this is currently implemented would not allow for
dynamically growing the stack (would need to add stuff for "reserved but
not committed" handling in this case; which is currently only
implemented for pagefile backed virtual memory).

As is, its handling is more like: If you request 1MB, it is going to
give you 1MB worth of physically-mapped pages (though, unlike with the
NOMMU mode, these pages need not be contiguous, so memory fragmentation
is at least slightly less of an issue in this case).

Note that as-is, pretty much all of the pagefile backed memory is
currently effectively funneled through a 32MB chunk of physical memory.

Previously, there was also an issue where the stack did not work if it
were put into virtual memory (sorta fixed now; had to get a little hack
with the system-call mechanism to put the syscall parameters and data
into designated memory buffers). But, seemingly still only works with
direct-mapped (crashes and instability result if trying to put it into
pagefile backed memory).

For some reason, program executable code also does not work reliably if
it is put into pagefile backed memory.

However, seemingly the ".data"/".bss" sections and the program heap can
be put into pagefile-backed memory without much issue.

Pretty much all of this is likely more TestKern related issues than
actual hardware-level limitations.

>>
>
>>
>> Say, 128MB of physical-mapped RAM doesn't go very far if one is
>> allocating 1MB for stack buffers and similar.
> <
> As long as your working set is 128KB or smaller it does not mater how
> big the allocation is, what matters is the working set.

Only if you have virtual memory...

With physically-mapped modes (AKA: NOMMU mode), or with direct VA->PA
allocation, once memory is allocated to the stack, one isn't getting it
back until the program terminates or similar.

Also, larger allocations are much worse effected by things like memory
fragmentation in these cases.

Similarly, there are "reasons" why my PBO ABI (and also ELF FDPIC) split
up the text/rodata/... and data/bss sections into two separately managed
chunks...

Granted, this isn't entirely invisible.

And, the effects of some of this are partly why there are not (yet)
Quake2 or Quake3 ports (beyond just the performance issues).

Both effectively use more memory than is viable for NOMMU...

Basically, Quake3 needs ~ 100MB in relatively large contiguous chunks
(after size-tuning it a bit to allow "the hunk" to be smaller), which
does not work for 128MB NOMMU.

Quake 2 is similar, as while it doesn't look much different from Quake 1
in some areas, it pretty much immediately ends up trying to allocate
upwards of 200MB of large contiguous "hunk" memory regions (seemingly
uses multiple "hunk" regions unlike both Quake 1 and 3).

....

But, once pagefile backed virtual memory is more settled, may consider
resuming work on porting these (nevermind if both would likely still be
too slow to be playable...).

Had also noted that despite Doom being able to run on machines with 4MB
of RAM, it seemingly actually requires closer to around 20MB to get the
Doom engine to work (the "4MB" part was seemingly accomplished via a
pagefile or similar in the case of DOS4GW, don't know the specifics
though), ...

I sorta have BtMini2 working, but ironically this was trying to shoehorn
an engine with a Minecraft style terrain system into a memory footprint
more comparable to Quake 1.

Sorta limited due to its overly short draw-distance, and how visibility
lags behind player movement (on the BJX2 core, it is not exactly
difficult to outrun the visible part of the scene).

So, in this case, more a "proof of concept" than anything actually playable.

....

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<c7ecba88-b16a-4bad-ae81-9cb04ccb8177n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31647&group=comp.arch#31647

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5b95:0:b0:3e3:8172:ff23 with SMTP id a21-20020ac85b95000000b003e38172ff23mr4639774qta.13.1681225846481;
Tue, 11 Apr 2023 08:10:46 -0700 (PDT)
X-Received: by 2002:a9d:65d7:0:b0:6a3:8d7d:83dd with SMTP id
z23-20020a9d65d7000000b006a38d7d83ddmr1021260oth.0.1681225846211; Tue, 11 Apr
2023 08:10:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 11 Apr 2023 08:10:45 -0700 (PDT)
In-Reply-To: <ljdZL.420088$5S78.182599@fx48.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:15c8:5e5c:64f4:ef97;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:15c8:5e5c:64f4:ef97
References: <u0f6gf$32irr$1@dont-email.me> <a533d5c4-8dca-44eb-ba43-bf38ab7f9f34n@googlegroups.com>
<2023Apr4.073909@mips.complang.tuwien.ac.at> <u10pbe$259vd$1@dont-email.me>
<2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me>
<2023Apr10.175439@mips.complang.tuwien.ac.at> <5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com>
<2023Apr10.230314@mips.complang.tuwien.ac.at> <XZ_YL.1523107$8_id.1501370@fx09.iad>
<u12jij$2gd1b$1@dont-email.me> <ljdZL.420088$5S78.182599@fx48.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c7ecba88-b16a-4bad-ae81-9cb04ccb8177n@googlegroups.com>
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 11 Apr 2023 15:10:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2318
 by: MitchAlsup - Tue, 11 Apr 2023 15:10 UTC

On Tuesday, April 11, 2023 at 8:32:07 AM UTC-5, Scott Lurndal wrote:
> BGB <cr8...@gmail.com> writes:
> >On 4/10/2023 4:13 PM, Scott Lurndal wrote:
> >> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> >>> Michael S <already...@yahoo.com> writes:
>
> >This being partly because:
> >Variable size stack frames are evil;
> >If one excludes large allocations from the stack (including large
> >arrays), one may find that 128k of stack space is sufficient for most
> >programs.
<
> It's not 1989 anymore.
<
Algol60 had no where other than the stack to put dynamically allocated
arrays.......

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<b3f6a231-46b5-44b2-9add-281cbe3e94c4n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31648&group=comp.arch#31648

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:1821:b0:3e1:934d:ba1a with SMTP id t33-20020a05622a182100b003e1934dba1amr5397346qtc.3.1681226291938;
Tue, 11 Apr 2023 08:18:11 -0700 (PDT)
X-Received: by 2002:a05:6870:b00f:b0:180:401d:c985 with SMTP id
y15-20020a056870b00f00b00180401dc985mr8724348oae.0.1681226291566; Tue, 11 Apr
2023 08:18:11 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 11 Apr 2023 08:18:11 -0700 (PDT)
In-Reply-To: <74afe76f-5b24-4ad9-8a0d-798af5fb13f2n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:15c8:5e5c:64f4:ef97;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:15c8:5e5c:64f4:ef97
References: <u0f6gf$32irr$1@dont-email.me> <a533d5c4-8dca-44eb-ba43-bf38ab7f9f34n@googlegroups.com>
<2023Apr4.073909@mips.complang.tuwien.ac.at> <u10pbe$259vd$1@dont-email.me>
<2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me>
<2023Apr10.175439@mips.complang.tuwien.ac.at> <5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com>
<2023Apr10.230314@mips.complang.tuwien.ac.at> <XZ_YL.1523107$8_id.1501370@fx09.iad>
<u12jij$2gd1b$1@dont-email.me> <ljdZL.420088$5S78.182599@fx48.iad> <74afe76f-5b24-4ad9-8a0d-798af5fb13f2n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b3f6a231-46b5-44b2-9add-281cbe3e94c4n@googlegroups.com>
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 11 Apr 2023 15:18:11 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3891
 by: MitchAlsup - Tue, 11 Apr 2023 15:18 UTC

On Tuesday, April 11, 2023 at 9:36:34 AM UTC-5, robf...@gmail.com wrote:
> On Tuesday, April 11, 2023 at 9:32:07 AM UTC-4, Scott Lurndal wrote:
> > BGB <cr8...@gmail.com> writes:
> > >On 4/10/2023 4:13 PM, Scott Lurndal wrote:
> > >> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> > >>> Michael S <already...@yahoo.com> writes:
> >
> > >This being partly because:
> > >Variable size stack frames are evil;
> > >If one excludes large allocations from the stack (including large
> > >arrays), one may find that 128k of stack space is sufficient for most
> > >programs.
> > It's not 1989 anymore.
> I may be a bit out of date here, but, I think some rules still apply.
> Passing large objects like arrays as parameters on the stack is not
> generally a good idea. It may lead to copying lots of memory around
> uselessly. Objects can be allocated on the stack but usually they are
> allocated on the heap especially if they are large, so they can be
> managed. Allocating them on the stack forces them to be deallocated
> at method return.
<
> I usually try and statically allocate any buffers that are known to be
> large and can be of a fixed size. This causes the program to fail right
> away at startup, instead of in the middle after processing tons of
> records. It also frees the program from doing memory management
> work while it is running, and moves the work to startup and shutdown.
<
The very vast majority of things I malloc() are structures of dynamic
size (cache descriptors, TLB descriptors, number of cores, ....) at
initialization time, that then stay allocated until the program terminates.
<
> But a lot depends on the purpose and type of application.
> Having said my two cents, I do use a lot more stack space in programs
> that I used to, simply because the space is available. It can reduce
> development time, not thinking through every algorithm. Development
> time cost. I used to do a lot of high-speed development with
> “throw-away” apps.

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<8FjZL.2056244$9sn9.1559046@fx17.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31649&group=comp.arch#31649

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Newsgroups: comp.arch
References: <u0f6gf$32irr$1@dont-email.me> <2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me> <2023Apr10.175439@mips.complang.tuwien.ac.at> <5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com> <2023Apr10.230314@mips.complang.tuwien.ac.at> <XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me> <ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me> <1576a6c6-e119-4368-8232-5f22dbc84416n@googlegroups.com> <u14fk5$2n42n$1@dont-email.me>
Lines: 96
Message-ID: <8FjZL.2056244$9sn9.1559046@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 11 Apr 2023 20:44:52 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 11 Apr 2023 20:44:52 GMT
X-Received-Bytes: 4028
 by: Scott Lurndal - Tue, 11 Apr 2023 20:44 UTC

BGB <cr88192@gmail.com> writes:
>On 4/11/2023 12:47 PM, MitchAlsup wrote:
>> On Tuesday, April 11, 2023 at 12:24:46 PM UTC-5, BGB wrote:
>>> On 4/11/2023 8:32 AM, Scott Lurndal wrote:
>>>> BGB <cr8...@gmail.com> writes:
>>>>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:
>>>>>> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>>>>>> Michael S <already...@yahoo.com> writes:
>>>>
>>>>> This being partly because:
>>>>> Variable size stack frames are evil;
>>>>> If one excludes large allocations from the stack (including large
>>>>> arrays), one may find that 128k of stack space is sufficient for most
>>>>> programs.
>>>>
>>>> It's not 1989 anymore.
>>>>
>>> ?...
>>>
>>> AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?...
>>>
>>> Where, say:
>>> CS, program;
>>> DS = SS, global variables and stack.
>>> Also heap for "small" or "tiny" model.
>>> ES, stomped for sake of "far" pointers.
>> <
>> You mean 1995...............
>
>I started learning C in the mid/late 90s, and this stuff was still around.
>
>However, I soon realized "16-bit sucks" and jumped over to Cygwin...
>
>My PC at the time was IIRC a 486 DX2-66.
>
>
>>>
>>> Comparably, 128K is massive...
>>>
>> But 16GB is standard today. 128K× BIGGER.
>
>??? !
>
>I was pretty sure it was still 1MB for Windows, 8MB for Linux.
>Yes, in 64-bit processes.

$ ulimit -a
address space limit (Kibytes) (-M) unlimited
core file size (blocks) (-c) 0
cpu time (seconds) (-t) unlimited
data size (Kibytes) (-d) unlimited
file size (blocks) (-f) unlimited
locks (-x) unlimited
locked address space (Kibytes) (-l) 64
message queue size (Kibytes) (-q) 800
nice (-e) 0
nofile (-n) 1024
nproc (-u) 1024
pipe buffer size (bytes) (-p) 4096
max memory size (Kibytes) (-m) unlimited
rtprio (-r) 0
socket buffer size (bytes) (-b) 4096
sigpend (-i) 63878
stack size (Kibytes) (-s) 8192
swap size (Kibytes) (-w) not supported
threads (-T) not supported
process size (Kibytes) (-v) unlimited

8MB for stack is the default.

>
>

>> <
>> Virtual memory works, and hides the complexities of doing it the easy way.
>> <
>
>Last I checked, the OS's generally use 40 or 48 bits of virtual address
>space.

The ARMv8 systems I work with are configurable from 16 bits to 52 bits VA's
on a per-process basis.

>> My architecture comes out of reset with the MMUs turned on and working.
>> Why would you not want virtual memory enabled ??
>
>Dealing with page-tables and/or TLB Miss handling at boot time seems
>like needless issues.

I presume that the MMUs are turned on with an identity[*] mapping. So no
page faults/misses.

[*] PA == VA.

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<aWeZL.244207$SdR7.163940@fx04.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31650&group=comp.arch#31650

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx04.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Newsgroups: comp.arch
References: <u0f6gf$32irr$1@dont-email.me> <2023Apr4.073909@mips.complang.tuwien.ac.at> <u10pbe$259vd$1@dont-email.me> <2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me> <2023Apr10.175439@mips.complang.tuwien.ac.at> <5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com> <2023Apr10.230314@mips.complang.tuwien.ac.at> <XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me> <ljdZL.420088$5S78.182599@fx48.iad> <74afe76f-5b24-4ad9-8a0d-798af5fb13f2n@googlegroups.com>
Lines: 47
Message-ID: <aWeZL.244207$SdR7.163940@fx04.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 11 Apr 2023 15:21:42 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 11 Apr 2023 15:21:42 GMT
X-Received-Bytes: 3322
 by: Scott Lurndal - Tue, 11 Apr 2023 15:21 UTC

"robf...@gmail.com" <robfi680@gmail.com> writes:
>On Tuesday, April 11, 2023 at 9:32:07=E2=80=AFAM UTC-4, Scott Lurndal wrote=
>:
>> BGB <cr8...@gmail.com> writes:=20
>> >On 4/10/2023 4:13 PM, Scott Lurndal wrote:=20
>> >> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:=20
>> >>> Michael S <already...@yahoo.com> writes:=20
>>=20
>> >This being partly because:=20
>> >Variable size stack frames are evil;=20
>> >If one excludes large allocations from the stack (including large=20
>> >arrays), one may find that 128k of stack space is sufficient for most=20
>> >programs.
>> It's not 1989 anymore.
>
>I may be a bit out of date here, but, I think some rules still apply.
>Passing large objects like arrays as parameters on the stack is not
>generally a good idea. It may lead to copying lots of memory around
>uselessly. Objects can be allocated on the stack but usually they are
>allocated on the heap especially if they are large, so they can be
>managed. Allocating them on the stack forces them to be deallocated
>at method return.

"forces" is not correct. "allows" is more appropriate.

There's no single answer, but modern stacks are multiple megabytes
and there is no reason to invoke a heap allocator when the stack
works perfectly well, particularly for the example above (which
someone had elided) where the allocated data is only used in
the function itself. Heap allocation is not overhead free,
stack allocation is (both are subject to paging residency overhead by
the OS, of course).

Where the allocation size is unbounded and unknown at compile time
one may choose at runtime from which (stack or heap) that the memory
is allocated based on allocation size, or may simply use the heap
(which also has size constraints, of course.) Posix systems
have per-process resource limits for both the stack and heap.

32-bit systems add additional constraints on both heap and
stack sizes due to the limited virtual address space (2GB or
3GB depending on OS configuration).

I generally use mmap() for larger than a page allocations rather than abusing
the heap allocator (malloc). In bare metal applications where performance
and reliability is required, pool allocators are generally preferred.

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<778afe7a-2878-4f75-ba8e-60d354694bacn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31651&group=comp.arch#31651

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:18a7:b0:3e1:6129:f094 with SMTP id v39-20020a05622a18a700b003e16129f094mr5849320qtc.7.1681248562293;
Tue, 11 Apr 2023 14:29:22 -0700 (PDT)
X-Received: by 2002:a05:6870:8091:b0:17e:5bc4:9ac9 with SMTP id
q17-20020a056870809100b0017e5bc49ac9mr7088068oab.10.1681248562148; Tue, 11
Apr 2023 14:29:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 11 Apr 2023 14:29:21 -0700 (PDT)
In-Reply-To: <8FjZL.2056244$9sn9.1559046@fx17.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=99.251.79.92; posting-account=QId4bgoAAABV4s50talpu-qMcPp519Eb
NNTP-Posting-Host: 99.251.79.92
References: <u0f6gf$32irr$1@dont-email.me> <2023Apr10.143646@mips.complang.tuwien.ac.at>
<u118f4$27ckk$1@dont-email.me> <2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com> <2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
<1576a6c6-e119-4368-8232-5f22dbc84416n@googlegroups.com> <u14fk5$2n42n$1@dont-email.me>
<8FjZL.2056244$9sn9.1559046@fx17.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <778afe7a-2878-4f75-ba8e-60d354694bacn@googlegroups.com>
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
From: robfi...@gmail.com (robf...@gmail.com)
Injection-Date: Tue, 11 Apr 2023 21:29:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5636
 by: robf...@gmail.com - Tue, 11 Apr 2023 21:29 UTC

On Tuesday, April 11, 2023 at 4:44:56 PM UTC-4, Scott Lurndal wrote:
> BGB <cr8...@gmail.com> writes:
> >On 4/11/2023 12:47 PM, MitchAlsup wrote:
> >> On Tuesday, April 11, 2023 at 12:24:46 PM UTC-5, BGB wrote:
> >>> On 4/11/2023 8:32 AM, Scott Lurndal wrote:
> >>>> BGB <cr8...@gmail.com> writes:
> >>>>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:
> >>>>>> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> >>>>>>> Michael S <already...@yahoo.com> writes:
> >>>>
> >>>>> This being partly because:
> >>>>> Variable size stack frames are evil;
> >>>>> If one excludes large allocations from the stack (including large
> >>>>> arrays), one may find that 128k of stack space is sufficient for most
> >>>>> programs.
> >>>>
> >>>> It's not 1989 anymore.
> >>>>
> >>> ?...
> >>>
> >>> AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?...
> >>>
> >>> Where, say:
> >>> CS, program;
> >>> DS = SS, global variables and stack.
> >>> Also heap for "small" or "tiny" model.
> >>> ES, stomped for sake of "far" pointers.
> >> <
> >> You mean 1995...............
> >
> >I started learning C in the mid/late 90s, and this stuff was still around.
> >
> >However, I soon realized "16-bit sucks" and jumped over to Cygwin...
> >
> >My PC at the time was IIRC a 486 DX2-66.
> >
> >
> >>>
> >>> Comparably, 128K is massive...
> >>>
> >> But 16GB is standard today. 128K× BIGGER.
> >
> >??? !
> >
> >I was pretty sure it was still 1MB for Windows, 8MB for Linux.
> >Yes, in 64-bit processes.
> $ ulimit -a
> address space limit (Kibytes) (-M) unlimited
> core file size (blocks) (-c) 0
> cpu time (seconds) (-t) unlimited
> data size (Kibytes) (-d) unlimited
> file size (blocks) (-f) unlimited
> locks (-x) unlimited
> locked address space (Kibytes) (-l) 64
> message queue size (Kibytes) (-q) 800
> nice (-e) 0
> nofile (-n) 1024
> nproc (-u) 1024
> pipe buffer size (bytes) (-p) 4096
> max memory size (Kibytes) (-m) unlimited
> rtprio (-r) 0
> socket buffer size (bytes) (-b) 4096
> sigpend (-i) 63878
> stack size (Kibytes) (-s) 8192
> swap size (Kibytes) (-w) not supported
> threads (-T) not supported
> process size (Kibytes) (-v) unlimited
>
> 8MB for stack is the default.
> >
> >
>
> >> <
> >> Virtual memory works, and hides the complexities of doing it the easy way.
> >> <
> >
> >Last I checked, the OS's generally use 40 or 48 bits of virtual address
> >space.
> The ARMv8 systems I work with are configurable from 16 bits to 52 bits VA's
> on a per-process basis.
> >> My architecture comes out of reset with the MMUs turned on and working..
> >> Why would you not want virtual memory enabled ??
> >
> >Dealing with page-tables and/or TLB Miss handling at boot time seems
> >like needless issues.
> I presume that the MMUs are turned on with an identity[*] mapping. So no
> page faults/misses.
>
> [*] PA == VA.

Yes, no TLB misses occur during boot.

The Thor2023 MMU automagically initializes a fixed way of the TLB with entries
for the last 256kB of memory on reset, as an identity map, to allow the boot
ROM to be reached. Once the ROM is active one of the first things it does is
add entries to the TLB for I/O and RAM. The processor reset vector goes to
$F…FD0000. There is a scratchpad RAM in the boot address space at
$F…FCxxxx.
Getting the system to boot is a bit scary, but it works much the same way as if
there were no MMU. CPU access is halted until the TLB ready signal is active.
Memory accesses take two extra clock cycles for the map. Two clock is not
much compared to the access time of the DRAM.

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<u14jpp$2neth$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31652&group=comp.arch#31652

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Date: Tue, 11 Apr 2023 16:34:42 -0500
Organization: A noiseless patient Spider
Lines: 150
Message-ID: <u14jpp$2neth$1@dont-email.me>
References: <u0f6gf$32irr$1@dont-email.me>
<2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me>
<2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com>
<2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
<EUgZL.2295552$vBI8.1111497@fx15.iad>
<a85d3e0c-e0fd-4569-b7c9-2779ab298849n@googlegroups.com>
<BghZL.388802$cKvc.221021@fx42.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Apr 2023 21:34:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a6a4710ef1de506fa195e36e24a90235";
logging-data="2866097"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/vwHxespThM7VnD05HZUK2"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Cancel-Lock: sha1:v3ToANPbG+nS8l2ix8c94sbYXoM=
Content-Language: en-US
In-Reply-To: <BghZL.388802$cKvc.221021@fx42.iad>
 by: BGB - Tue, 11 Apr 2023 21:34 UTC

On 4/11/2023 1:02 PM, Scott Lurndal wrote:
> MitchAlsup <MitchAlsup@aol.com> writes:
>> On Tuesday, April 11, 2023 at 12:36:39=E2=80=AFPM UTC-5, Scott Lurndal wrot=
>> e:
>>> BGB <cr8...@gmail.com> writes:=20
>>>> On 4/11/2023 8:32 AM, Scott Lurndal wrote:=20
>>>>> BGB <cr8...@gmail.com> writes:=20
>>>>>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:=20
>>>>>>> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:=20
>>>>>>>> Michael S <already...@yahoo.com> writes:=20
>>>>> =20
>>>>>> This being partly because:=20
>>>>>> Variable size stack frames are evil;=20
>>>>>> If one excludes large allocations from the stack (including large=20
>>>>>> arrays), one may find that 128k of stack space is sufficient for most=
>> =20
>>>>>> programs.=20
>>>>> =20
>>>>> It's not 1989 anymore.=20
>>>>> =20
>>>> =20
>>>> ?...=20
>>>> =20
>>>> AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?.=
>> ..
>>> The VAX had a 32-bit flat address space in 1978[*]. The i386 had one by 1=
>> 985.=20
>>> =20
>>> Not to mention the dozens of mainframe and minicomputers available with=
>> =20
>>> large memory spaces from the last 1960s.=20
>> <
>> CDC 6600, 7600, CRAY 1, 1S, XMP, YMP,
>> IBM 360s, 370s, 30x0s,=20
>> Univac 1108,
>
> You left out all the Burroughs boxen, not flat, but large.
>
>
>> S.E.L., InterData 32,=20
>> PDP 6, PDP 10, PDP 11, VAX, Alpha,
>> All RISC architectures,
>> :: all had flat address spaces.
>>> =20
>>> [*] Although in 1979, 4MB was a large amount of physical memory, VMS=20
>>> had working sets and paging, as did the 370 successors and most other=20
>>> mainframe lines. Even the PDP-10 had 256k words (36-bit) of magnetic=20
>>> core memory.
>> <
>> When I bought my first computer in 1995, It came with 4 MB, and after using=
>
> I had an Amiga 1000 in 1986, and had a motorola 88k VME box (SVR3) from 1992-1997
> that I brought home from work when we replaced them with Unisys S/8400 boxes.
>

Well, at least I existed in '86 ...
Wasn't doing much with computers yet though.

Apparently the Amiga's had dedicated hardware mixer chips.

I had on-off considered possibly doing something similar for BJX2,
partly as this could allow it to play S3M tracker music and similar
without eating the CPU.

I might do it a little differently though, likely with 16 channels with
separate left and right volume. Preferably, it could also be used for
game sound effect mixing.

While, theoretically, S3M can do 32 voices at the same time, pretty much
none I had looked at do so, so probably don't need that many voices.

Would probably make sense for it to support 8-bit PCM and A-Law with a
variable sample rate per-channel (probably 1 MHz with a 16-bit clock
divisor).

Not done much yet, not sure if worth the cost (vs just continuing to mix
stuff in software).

Do have a hardware FM synthesis module at least (as opposed to doing
MIDI playback in software). But, MIDI playback in software is a similar
sort of issue (in a computational sense) to S3M playback (and hardware
that could do S3M style mixing could also be used for wavetable MIDI or
similar as well).

>> =20
>> it for 2 days, I went out and bought 16MB more. Since windows 3.1 did not
>> use more than 16 MB, I configured the other 4MB as the disk cache, and=20
>> turned off the swapper. My 33 MHz 486 outran my wife's 100 MHz Pentium.
>
> My first owned computer was a Pentium Pro dual processor system using
> the providence mobo (homebuilt):
>
> https://www.amazon.com/PR440FX-PROVIDENCE-PENTIUM-UWSCSI-MOTHERBOARD/dp/B00MX3PBZG
>
> Replaced 7 years later with an IBM 2 processor intel server.
>

Fairly early on, my parents had a 486SX-33.

My first PC (was given, second-hand) was an 8088 with CGA, but this was
old even then (and was kinda annoyed that I could neither run Windows
nor Doom on the thing). It ran the MS-DOS command-line, and Sim City,
but not a whole lot else...

It also had a 5.25" floppy drive and a fairly small HDD.

I got a 486DX2-66 some time after, and was able to put Win95 on it
(still fairly new at the time). Then, parents went an got a Pentium II
with Win98 (which could run Quake and Quake 2 much more effectively;
they were basically unplayable on my 486).

>> <
>> The real question is why anyone would want something other than a large fla=
>> t=20
>> address space ??
>
> Indeed.
>

If seen as 48-bit, the address space on BJX2 is flat.

The 96-bit space is "flat-ish", though the pointer format and similar
does effectively preclude having memory objects larger than 256TB.

Still can be treated as a large flat address space as far as pointer
arithmetic and __int128 are concerned (using int128 for intptr_t and
diffptr_t and similar in 128-bit ABI mode).

Currently, I suspect that the 128-bit ABI is basically "massive
overkill" for the foreseeable future, so have mostly shelved this idea
for now.

If anything, in the near term, the 96-bit space would likely serve to
allow an OS kernel to be able to have pointers into every user process
at the same time, while allowing each user processes to seemingly have
its own 48-bit address space.

Or, potentially, for programs to optionally share pointers into memory
held within a different logical process (with an explicit "huge"
modifier to tell the compiler to give them a 128-bit pointer).

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<u14kdf$2ngi5$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31653&group=comp.arch#31653

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Date: Tue, 11 Apr 2023 14:45:18 -0700
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <u14kdf$2ngi5$1@dont-email.me>
References: <u0f6gf$32irr$1@dont-email.me>
<2023Apr4.073909@mips.complang.tuwien.ac.at> <u10pbe$259vd$1@dont-email.me>
<2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me>
<2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com>
<2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
<EUgZL.2295552$vBI8.1111497@fx15.iad>
<a85d3e0c-e0fd-4569-b7c9-2779ab298849n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 11 Apr 2023 21:45:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="04b8691cb9f53fc7caa16ca047fe8713";
logging-data="2867781"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NkoE4o9K/N6HgXLl4xG6rQTGWRQv6u1c="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Cancel-Lock: sha1:lS2qE56bNUoUs11eqmVpe3Did3k=
Content-Language: en-US
In-Reply-To: <a85d3e0c-e0fd-4569-b7c9-2779ab298849n@googlegroups.com>
 by: Stephen Fuld - Tue, 11 Apr 2023 21:45 UTC

On 4/11/2023 10:55 AM, MitchAlsup wrote:
> On Tuesday, April 11, 2023 at 12:36:39 PM UTC-5, Scott Lurndal wrote:
>> BGB <cr8...@gmail.com> writes:
>>> On 4/11/2023 8:32 AM, Scott Lurndal wrote:
>>>> BGB <cr8...@gmail.com> writes:
>>>>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:
>>>>>> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>>>>>> Michael S <already...@yahoo.com> writes:
>>>>
>>>>> This being partly because:
>>>>> Variable size stack frames are evil;
>>>>> If one excludes large allocations from the stack (including large
>>>>> arrays), one may find that 128k of stack space is sufficient for most
>>>>> programs.
>>>>
>>>> It's not 1989 anymore.
>>>>
>>>
>>> ?...
>>>
>>> AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?...
>> The VAX had a 32-bit flat address space in 1978[*]. The i386 had one by 1985.
>>
>> Not to mention the dozens of mainframe and minicomputers available with
>> large memory spaces from the last 1960s.
> <
> CDC 6600, 7600, CRAY 1, 1S, XMP, YMP,
> IBM 360s, 370s, 30x0s,
> Univac 1108,

Sort of, but not really. The actual 1108 (not its successors), had up
to 262K (they used that value for 2**18) words of memory, approximately
1 MB in today's terms. But it was logically divided into "banks", each
with a base and a limit for addressing and protection. Typical programs
had one I-bank (for instructions) and a D-bank (for data). Both of these
were pointed to by hardware registers. But if you wanted more memory
than would fit into a single bank, you could get it by instantiating
additional banks. All banks used the same addresses but there were
instructions to "point" a bank, that is, load its base and limits into
one of the two hardware bank base and limit registers. This was decided
not "flat".

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<5cfffa1d-9d9c-446c-a66f-15db6e0d06b1n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31654&group=comp.arch#31654

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:622a:1890:b0:3e3:7c8b:24fa with SMTP id v16-20020a05622a189000b003e37c8b24famr5014564qtc.10.1681250062765;
Tue, 11 Apr 2023 14:54:22 -0700 (PDT)
X-Received: by 2002:a05:6808:208e:b0:36e:f6f5:66a2 with SMTP id
s14-20020a056808208e00b0036ef6f566a2mr1121889oiw.8.1681250061050; Tue, 11 Apr
2023 14:54:21 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 11 Apr 2023 14:54:20 -0700 (PDT)
In-Reply-To: <u14fk5$2n42n$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:15c8:5e5c:64f4:ef97;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:15c8:5e5c:64f4:ef97
References: <u0f6gf$32irr$1@dont-email.me> <a533d5c4-8dca-44eb-ba43-bf38ab7f9f34n@googlegroups.com>
<2023Apr4.073909@mips.complang.tuwien.ac.at> <u10pbe$259vd$1@dont-email.me>
<2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me>
<2023Apr10.175439@mips.complang.tuwien.ac.at> <5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com>
<2023Apr10.230314@mips.complang.tuwien.ac.at> <XZ_YL.1523107$8_id.1501370@fx09.iad>
<u12jij$2gd1b$1@dont-email.me> <ljdZL.420088$5S78.182599@fx48.iad>
<u1454q$2mbg6$1@dont-email.me> <1576a6c6-e119-4368-8232-5f22dbc84416n@googlegroups.com>
<u14fk5$2n42n$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5cfffa1d-9d9c-446c-a66f-15db6e0d06b1n@googlegroups.com>
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 11 Apr 2023 21:54:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4772
 by: MitchAlsup - Tue, 11 Apr 2023 21:54 UTC

On Tuesday, April 11, 2023 at 3:23:36 PM UTC-5, BGB wrote:
> On 4/11/2023 12:47 PM, MitchAlsup wrote:

> Last I checked, the OS's generally use 40 or 48 bits of virtual address
> space.
>
So, given a 48-bit VAS, how many stacks of size 1MB can you fit ??
<
How hard do you have to look to find a PC with less than 16GB of main memory ??
>
> On BJX2, one could still probably have multi-GB stacks in virtual
> memory, but I am not sure I see much point.
>
> A 1MB stack being sufficient is nearly universal.
>
> It is mostly when one goes smaller that annoyances start popping up, but
> practically, apart from code occasionally trying to put an oversize
> array on the stack, 128K or similar is sufficient.
>
> If virtual memory were more proven in my case, "sure, why not use 1MB?...".
>
>
> Practically, it means needing to figure out the "SDcard CRC or whatever"
> situation (so, one can write blocks to the SDcard without it being like
> "hahaha, no").
>
> Otherwise, stuff was "mostly working" on the otherwise read-only access
> to the SDcard.
> >> Windows typically uses 1MB for the stack, but this seems overkill IME,
> >> and also Windows always operates with virtual memory enabled.
> >>
> > My architecture comes out of reset with the MMUs turned on and working.
> > Why would you not want virtual memory enabled ??
<
> Dealing with page-tables and/or TLB Miss handling at boot time seems
> like needless issues.
<
That is one of the points of my architecture. The MMU is always on, and
the Boot ROM has page tables for (well) the Boot ROM. This prevents all
sorts of bad-actors altering ROM to take over. So, Boot, itself, does not
take pagefaults, but it certainly does take TLB misses. In fact, you cannot
take pagefaults until you find, configure, and initialize DRAM and some
kind of paging-disk (hard or spinning iron).
>
> There is handling (and an address range for) "virtual memory but
> directly mapped to underlying physical memory".
<
If this is what you want, you can have a TLB entry that maps all of
virtual = physical in one PTE.
>
But I don't understand why you would allow Boot to read things that are
execute only, or to write things that are read-only. ?!? Boot must be as secure
as anything else, you later you have to add special modes (and crap) so that
you Boot without allowing bad-actors a shot at the system (Root kit and all that).
<
> >> Say, 128MB of physical-mapped RAM doesn't go very far if one is
> >> allocating 1MB for stack buffers and similar.
> > <
> > As long as your working set is 128KB or smaller it does not mater how
> > big the allocation is, what matters is the working set.
> Only if you have virtual memory...
<
Which I have by the time that Boot relinquishes control to GuestOS.
<

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<u14kul$2nhof$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31655&group=comp.arch#31655

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Date: Tue, 11 Apr 2023 14:54:28 -0700
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <u14kul$2nhof$1@dont-email.me>
References: <u0f6gf$32irr$1@dont-email.me>
<2023Apr4.073909@mips.complang.tuwien.ac.at> <u10pbe$259vd$1@dont-email.me>
<2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me>
<2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com>
<2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
<EUgZL.2295552$vBI8.1111497@fx15.iad>
<a85d3e0c-e0fd-4569-b7c9-2779ab298849n@googlegroups.com>
<ff347edb-e5d1-42f0-9cc4-b95778c26cd7n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 11 Apr 2023 21:54:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="04b8691cb9f53fc7caa16ca047fe8713";
logging-data="2869007"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18mN1CJ0O5+fXEbKGn2r96HahmRG8/3DLM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Cancel-Lock: sha1:7MlZPmXPZNGHJWxdOpoeU+GJqDk=
Content-Language: en-US
In-Reply-To: <ff347edb-e5d1-42f0-9cc4-b95778c26cd7n@googlegroups.com>
 by: Stephen Fuld - Tue, 11 Apr 2023 21:54 UTC

On 4/11/2023 12:51 PM, Timothy McCaffrey wrote:
> On Tuesday, April 11, 2023 at 1:55:49 PM UTC-4, MitchAlsup wrote:
>
>>> Not to mention the dozens of mainframe and minicomputers available with
>>> large memory spaces from the last 1960s.
>> <
>> CDC 6600, 7600, CRAY 1, 1S, XMP, YMP,
>
> CDC 180 series was segment/selector/descriptor based (they had a 6000 series emulation mode).
>
>> IBM 360s, 370s, 30x0s,
>> Univac 1108,
>
> I believe the Univac 2200 expanded the address space by adding something similar to 386 protected mode segments/selectors.

Not really. The story of the 1108 and its successors adapting to larger
and larger memories (both the maximum physical memory, and the maximum
memory a program could address is a long and complex one, with several
steps and a lot of "uglyness". The requirements for backward
compatibility are bitch. :-(

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<fdc77b2c-afb9-443b-bf52-d81f6ec890c4n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31656&group=comp.arch#31656

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:6214:b27:b0:56f:18ed:316f with SMTP id w7-20020a0562140b2700b0056f18ed316fmr865169qvj.1.1681250429567;
Tue, 11 Apr 2023 15:00:29 -0700 (PDT)
X-Received: by 2002:a05:6870:6112:b0:17f:d30c:6e62 with SMTP id
s18-20020a056870611200b0017fd30c6e62mr355800oae.0.1681250429291; Tue, 11 Apr
2023 15:00:29 -0700 (PDT)
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 11 Apr 2023 15:00:29 -0700 (PDT)
In-Reply-To: <8FjZL.2056244$9sn9.1559046@fx17.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:15c8:5e5c:64f4:ef97;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:15c8:5e5c:64f4:ef97
References: <u0f6gf$32irr$1@dont-email.me> <2023Apr10.143646@mips.complang.tuwien.ac.at>
<u118f4$27ckk$1@dont-email.me> <2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com> <2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
<1576a6c6-e119-4368-8232-5f22dbc84416n@googlegroups.com> <u14fk5$2n42n$1@dont-email.me>
<8FjZL.2056244$9sn9.1559046@fx17.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fdc77b2c-afb9-443b-bf52-d81f6ec890c4n@googlegroups.com>
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 11 Apr 2023 22:00:29 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: MitchAlsup - Tue, 11 Apr 2023 22:00 UTC

On Tuesday, April 11, 2023 at 3:44:56 PM UTC-5, Scott Lurndal wrote:
> BGB <cr8...@gmail.com> writes:
> >On 4/11/2023 12:47 PM, MitchAlsup wrote:
> >> On Tuesday, April 11, 2023 at 12:24:46 PM UTC-5, BGB wrote:
> >>> On 4/11/2023 8:32 AM, Scott Lurndal wrote:
> >>>> BGB <cr8...@gmail.com> writes:
> >>>>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:
> >>>>>> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> >>>>>>> Michael S <already...@yahoo.com> writes:
> >>>>
> >>>>> This being partly because:
> >>>>> Variable size stack frames are evil;
> >>>>> If one excludes large allocations from the stack (including large
> >>>>> arrays), one may find that 128k of stack space is sufficient for most
> >>>>> programs.
> >>>>
> >>>> It's not 1989 anymore.
> >>>>
> >>> ?...
> >>>
> >>> AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?...
> >>>
> >>> Where, say:
> >>> CS, program;
> >>> DS = SS, global variables and stack.
> >>> Also heap for "small" or "tiny" model.
> >>> ES, stomped for sake of "far" pointers.
> >> <
> >> You mean 1995...............
> >
> >I started learning C in the mid/late 90s, and this stuff was still around.
> >
> >However, I soon realized "16-bit sucks" and jumped over to Cygwin...
> >
> >My PC at the time was IIRC a 486 DX2-66.
> >
> >
> >>>
> >>> Comparably, 128K is massive...
> >>>
> >> But 16GB is standard today. 128K× BIGGER.
> >
> >??? !
> >
> >I was pretty sure it was still 1MB for Windows, 8MB for Linux.
> >Yes, in 64-bit processes.
> $ ulimit -a
> address space limit (Kibytes) (-M) unlimited
> core file size (blocks) (-c) 0
> cpu time (seconds) (-t) unlimited
> data size (Kibytes) (-d) unlimited
> file size (blocks) (-f) unlimited
> locks (-x) unlimited
> locked address space (Kibytes) (-l) 64
> message queue size (Kibytes) (-q) 800
> nice (-e) 0
> nofile (-n) 1024
> nproc (-u) 1024
> pipe buffer size (bytes) (-p) 4096
> max memory size (Kibytes) (-m) unlimited
> rtprio (-r) 0
> socket buffer size (bytes) (-b) 4096
> sigpend (-i) 63878
> stack size (Kibytes) (-s) 8192
> swap size (Kibytes) (-w) not supported
> threads (-T) not supported
> process size (Kibytes) (-v) unlimited
>
> 8MB for stack is the default.
> >
> >
>
> >> <
> >> Virtual memory works, and hides the complexities of doing it the easy way.
> >> <
> >
> >Last I checked, the OS's generally use 40 or 48 bits of virtual address
> >space.
> The ARMv8 systems I work with are configurable from 16 bits to 52 bits VA's
> on a per-process basis.
<
My 66000 can use 23-bit, 33-bit, 43-bit, 53-bit, and 63-bit Virtual address spaces
on a per process basis. {I doubt that 13-bits can be used in any realistic way, though}
<
> >> My architecture comes out of reset with the MMUs turned on and working..
> >> Why would you not want virtual memory enabled ??
> >
> >Dealing with page-tables and/or TLB Miss handling at boot time seems
> >like needless issues.
<
> I presume that the MMUs are turned on with an identity[*] mapping. So no
> page faults/misses.
>
> [*] PA == VA.
<
They COULD be, but I am assuming that Boot contains translation tables for Boot.
The trick is that by the time the core starts executing instructions (yes, the very
first instruction) all the control registers have been initialized by (who other than
Boot). All the registers and control registers arrive with "control".
<
If Boot wanted to make PA = VA there is a PTE for that.
But since (effectively) CR3 arrives with control the MMU is functional by the
time the first instruction is fetched.

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<u14ld2$2niqg$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31657&group=comp.arch#31657

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Date: Tue, 11 Apr 2023 17:02:03 -0500
Organization: A noiseless patient Spider
Lines: 68
Message-ID: <u14ld2$2niqg$1@dont-email.me>
References: <u0f6gf$32irr$1@dont-email.me> <u10pbe$259vd$1@dont-email.me>
<2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me>
<2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com>
<2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
<EUgZL.2295552$vBI8.1111497@fx15.iad> <u14a94$2mo98$1@dont-email.me>
<17iZL.2056241$9sn9.458257@fx17.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Apr 2023 22:02:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b45682655530a49c54af21c90a2e9cc8";
logging-data="2870096"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19l99itbXVoPDYNiapyGWFN"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Cancel-Lock: sha1:5kKEVI8MCUAaiAZUw4nuntYbLAc=
Content-Language: en-US
In-Reply-To: <17iZL.2056241$9sn9.458257@fx17.iad>
 by: BGB - Tue, 11 Apr 2023 22:02 UTC

On 4/11/2023 2:00 PM, Scott Lurndal wrote:
> BGB <cr88192@gmail.com> writes:
>> On 4/11/2023 12:36 PM, Scott Lurndal wrote:
>>> BGB <cr88192@gmail.com> writes:
>>>> On 4/11/2023 8:32 AM, Scott Lurndal wrote:
>>>>> BGB <cr88192@gmail.com> writes:
>>>>>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:
>>>>>>> anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>>>>>>> Michael S <already5chosen@yahoo.com> writes:
>>>>>
>>>>>> This being partly because:
>>>>>> Variable size stack frames are evil;
>>>>>> If one excludes large allocations from the stack (including large
>>>>>> arrays), one may find that 128k of stack space is sufficient for most
>>>>>> programs.
>>>>>
>>>>> It's not 1989 anymore.
>>>>>
>>>>
>>>> ?...
>>>>
>>>> AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?...
>>>
>>> The VAX had a 32-bit flat address space in 1978[*]. The i386 had one by 1985.
>>>
>>
>> But, the actual transition to 32 bits didn't really happen until the
>> Win9X era
>
> Nonsense. There were a number of unix systems running in i386 long
> before the toy windows systems were available. Not to mention
> all the 32- bit risc systems in the late 80s and early 90's.
>

Pretty much all the computers people "actually used" were running DOS
and Windows, with an x86 chip of some sort.

Did encounter Macs and similar a few times, but they were rare (Apple
being "mostly dead" at the time, but seemingly coming "back from the
dead" with OSX and the iPhone; but their products are still not much
different than throwing a pile of money into a fire).

Did also randomly encounter an Apple II/e and C64 and similar at various
points, but never really seriously did much on them (a Apple II or C64
being very limited compared with a PC running Win95 or similar); these
being seemingly archaic to me at the time...

Never saw much of them again, until seeing people on YouTube who were
really into them (and some of their engineering aspects being kinda
interesting).

> Nobody took DOS or Win3.1 or even Win95 seriously. It wasn't until
> NT that windows got any traction in the server world, and even then
> it took until NT4 for it to be somewhat usable.

Admittedly.

I switched to dual booting Linux (Slackware) and NT4 in 7th grade, as I
was annoyed by endless crashing from Win95 (and after a crash
irrecoverably lost the contents of my PC's HDD).

NT4 not crashing all the time was a worthwhile tradeoff even if many
programs refused to run on it.

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<GUkZL.1312532$gGD7.492818@fx11.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31658&group=comp.arch#31658

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx11.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Newsgroups: comp.arch
References: <u0f6gf$32irr$1@dont-email.me> <u118f4$27ckk$1@dont-email.me> <2023Apr10.175439@mips.complang.tuwien.ac.at> <5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com> <2023Apr10.230314@mips.complang.tuwien.ac.at> <XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me> <ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me> <EUgZL.2295552$vBI8.1111497@fx15.iad> <u14a94$2mo98$1@dont-email.me> <17iZL.2056241$9sn9.458257@fx17.iad> <u14ld2$2niqg$1@dont-email.me>
Lines: 43
Message-ID: <GUkZL.1312532$gGD7.492818@fx11.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 11 Apr 2023 22:09:42 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 11 Apr 2023 22:09:42 GMT
X-Received-Bytes: 2623
 by: Scott Lurndal - Tue, 11 Apr 2023 22:09 UTC

BGB <cr88192@gmail.com> writes:
>On 4/11/2023 2:00 PM, Scott Lurndal wrote:
>> BGB <cr88192@gmail.com> writes:
>>> On 4/11/2023 12:36 PM, Scott Lurndal wrote:
>>>> BGB <cr88192@gmail.com> writes:
>>>>> On 4/11/2023 8:32 AM, Scott Lurndal wrote:
>>>>>> BGB <cr88192@gmail.com> writes:
>>>>>>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:
>>>>>>>> anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>>>>>>>> Michael S <already5chosen@yahoo.com> writes:
>>>>>>
>>>>>>> This being partly because:
>>>>>>> Variable size stack frames are evil;
>>>>>>> If one excludes large allocations from the stack (including large
>>>>>>> arrays), one may find that 128k of stack space is sufficient for most
>>>>>>> programs.
>>>>>>
>>>>>> It's not 1989 anymore.
>>>>>>
>>>>>
>>>>> ?...
>>>>>
>>>>> AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?...
>>>>
>>>> The VAX had a 32-bit flat address space in 1978[*]. The i386 had one by 1985.
>>>>
>>>
>>> But, the actual transition to 32 bits didn't really happen until the
>>> Win9X era
>>
>> Nonsense. There were a number of unix systems running in i386 long
>> before the toy windows systems were available. Not to mention
>> all the 32- bit risc systems in the late 80s and early 90's.
>>
>
>Pretty much all the computers people "actually used" were running DOS
>and Windows, with an x86 chip of some sort.

That's certainly not my experience. Sun, solbourne and SGI workstations
dominated the 90s, starting with the apollo workstations in the second
half of the 80s.

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<05b240ac-b43b-4676-9d3c-2b5bf248a36en@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31659&group=comp.arch#31659

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:d8c:b0:74a:508:e77c with SMTP id q12-20020a05620a0d8c00b0074a0508e77cmr198959qkl.11.1681255300221;
Tue, 11 Apr 2023 16:21:40 -0700 (PDT)
X-Received: by 2002:a05:6870:40c2:b0:179:c3d1:42d0 with SMTP id
l2-20020a05687040c200b00179c3d142d0mr5691699oal.11.1681255299983; Tue, 11 Apr
2023 16:21:39 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 11 Apr 2023 16:21:39 -0700 (PDT)
In-Reply-To: <GUkZL.1312532$gGD7.492818@fx11.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:15c8:5e5c:64f4:ef97;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:15c8:5e5c:64f4:ef97
References: <u0f6gf$32irr$1@dont-email.me> <u118f4$27ckk$1@dont-email.me>
<2023Apr10.175439@mips.complang.tuwien.ac.at> <5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com>
<2023Apr10.230314@mips.complang.tuwien.ac.at> <XZ_YL.1523107$8_id.1501370@fx09.iad>
<u12jij$2gd1b$1@dont-email.me> <ljdZL.420088$5S78.182599@fx48.iad>
<u1454q$2mbg6$1@dont-email.me> <EUgZL.2295552$vBI8.1111497@fx15.iad>
<u14a94$2mo98$1@dont-email.me> <17iZL.2056241$9sn9.458257@fx17.iad>
<u14ld2$2niqg$1@dont-email.me> <GUkZL.1312532$gGD7.492818@fx11.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <05b240ac-b43b-4676-9d3c-2b5bf248a36en@googlegroups.com>
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 11 Apr 2023 23:21:40 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3708
 by: MitchAlsup - Tue, 11 Apr 2023 23:21 UTC

On Tuesday, April 11, 2023 at 5:09:45 PM UTC-5, Scott Lurndal wrote:
> BGB <cr8...@gmail.com> writes:
> >On 4/11/2023 2:00 PM, Scott Lurndal wrote:
> >> BGB <cr8...@gmail.com> writes:
> >>> On 4/11/2023 12:36 PM, Scott Lurndal wrote:
> >>>> BGB <cr8...@gmail.com> writes:
> >>>>> On 4/11/2023 8:32 AM, Scott Lurndal wrote:
> >>>>>> BGB <cr8...@gmail.com> writes:
> >>>>>>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:
> >>>>>>>> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> >>>>>>>>> Michael S <already...@yahoo.com> writes:
> >>>>>>
> >>>>>>> This being partly because:
> >>>>>>> Variable size stack frames are evil;
> >>>>>>> If one excludes large allocations from the stack (including large
> >>>>>>> arrays), one may find that 128k of stack space is sufficient for most
> >>>>>>> programs.
> >>>>>>
> >>>>>> It's not 1989 anymore.
> >>>>>>
> >>>>>
> >>>>> ?...
> >>>>>
> >>>>> AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?...
> >>>>
> >>>> The VAX had a 32-bit flat address space in 1978[*]. The i386 had one by 1985.
> >>>>
> >>>
> >>> But, the actual transition to 32 bits didn't really happen until the
> >>> Win9X era
> >>
> >> Nonsense. There were a number of unix systems running in i386 long
> >> before the toy windows systems were available. Not to mention
> >> all the 32- bit risc systems in the late 80s and early 90's.
> >>
> >
> >Pretty much all the computers people "actually used" were running DOS
> >and Windows, with an x86 chip of some sort.
> That's certainly not my experience. Sun, solbourne and SGI workstations
> dominated the 90s, starting with the apollo workstations in the second
> half of the 80s.
<
I was assigned an Apollo workstation when I arrived at Motorola in 1983.
{The network was crap (losing tokens) but the rest of the machine was solid..}

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<u14rig$2nvrp$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31661&group=comp.arch#31661

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Date: Tue, 11 Apr 2023 18:47:21 -0500
Organization: A noiseless patient Spider
Lines: 207
Message-ID: <u14rig$2nvrp$1@dont-email.me>
References: <u0f6gf$32irr$1@dont-email.me>
<a533d5c4-8dca-44eb-ba43-bf38ab7f9f34n@googlegroups.com>
<2023Apr4.073909@mips.complang.tuwien.ac.at> <u10pbe$259vd$1@dont-email.me>
<2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me>
<2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com>
<2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
<1576a6c6-e119-4368-8232-5f22dbc84416n@googlegroups.com>
<u14fk5$2n42n$1@dont-email.me>
<5cfffa1d-9d9c-446c-a66f-15db6e0d06b1n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 11 Apr 2023 23:47:28 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b45682655530a49c54af21c90a2e9cc8";
logging-data="2883449"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+X2P8aZkwYGjZcWlS4QuQP"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Cancel-Lock: sha1:+yQAbItKxxNbyStUYWoHx7Gyqyw=
Content-Language: en-US
In-Reply-To: <5cfffa1d-9d9c-446c-a66f-15db6e0d06b1n@googlegroups.com>
 by: BGB - Tue, 11 Apr 2023 23:47 UTC

On 4/11/2023 4:54 PM, MitchAlsup wrote:
> On Tuesday, April 11, 2023 at 3:23:36 PM UTC-5, BGB wrote:
>> On 4/11/2023 12:47 PM, MitchAlsup wrote:
>
>> Last I checked, the OS's generally use 40 or 48 bits of virtual address
>> space.
>>
> So, given a 48-bit VAS, how many stacks of size 1MB can you fit ??

A lot.

Granted, my concern is more for the cases where one is not using virtual
memory.

> <
> How hard do you have to look to find a PC with less than 16GB of main memory ??

Not very hard...

https://www.amazon.com/Dell-Optiplex-3020-Computer-Bit-Multi-Language/dp/B08XZ53J4X

Just one example of many others...

Bigger question is if one wants to both with a PC with less than 16GB of
RAM with modern Windows....

>>
>> On BJX2, one could still probably have multi-GB stacks in virtual
>> memory, but I am not sure I see much point.
>>
>> A 1MB stack being sufficient is nearly universal.
>>
>> It is mostly when one goes smaller that annoyances start popping up, but
>> practically, apart from code occasionally trying to put an oversize
>> array on the stack, 128K or similar is sufficient.
>>
>> If virtual memory were more proven in my case, "sure, why not use 1MB?...".
>>
>>
>> Practically, it means needing to figure out the "SDcard CRC or whatever"
>> situation (so, one can write blocks to the SDcard without it being like
>> "hahaha, no").
>>
>> Otherwise, stuff was "mostly working" on the otherwise read-only access
>> to the SDcard.
>>>> Windows typically uses 1MB for the stack, but this seems overkill IME,
>>>> and also Windows always operates with virtual memory enabled.
>>>>
>>> My architecture comes out of reset with the MMUs turned on and working.
>>> Why would you not want virtual memory enabled ??
> <
>> Dealing with page-tables and/or TLB Miss handling at boot time seems
>> like needless issues.
> <
> That is one of the points of my architecture. The MMU is always on, and
> the Boot ROM has page tables for (well) the Boot ROM. This prevents all
> sorts of bad-actors altering ROM to take over. So, Boot, itself, does not
> take pagefaults, but it certainly does take TLB misses. In fact, you cannot
> take pagefaults until you find, configure, and initialize DRAM and some
> kind of paging-disk (hard or spinning iron).
>

I went the route of having MMU disabled on reset, with the kernel being
loaded with the MMU still disabled (the kernel then sets up virtual
memory for its own use).

Had originally wanted to have the page-table stuff in the Boot ROM, but
ended up not doing it that way (mostly because the ROM is 32K, and I
have ended up eating up a lot of it mostly doing boot-time sanity checks
for the CPU).

Also misc stuff like eliminating the hardware character ROM (in favor of
glyph RAM), which means the Boot ROM now needs to have all the font
glyphs to be able to display text (but did take note that I can fit
pretty much all of ASCII into 5x6 pixel character cells, which can then
be unpacked to the 8x8 cells needed for the display hardware).

>>
>> There is handling (and an address range for) "virtual memory but
>> directly mapped to underlying physical memory".
> <
> If this is what you want, you can have a TLB entry that maps all of
> virtual = physical in one PTE.

But, one can also have a bit in the MMU control register, and have it
not set, then the TLB is like, "Yep, VA==PA".

Originally, TLB also disabled itself during interrupts, but timing
turned into a problem, so this responsibility was moved to the L1 caches.

And, this in turn is because it is basically impossible to handle a TLB
Miss inside of an ISR with a software-managed TLB.

But, as a drawback, it also means that in my case, handling a system
call basically requires full context switches.

Say:
Program -> SysCall ISR
Saves off program registers into task context;
Switches to kernel SysCall handler task context;
Reloads SysCall handler registers;
Return from ISR (into supervisor mode).
SysCall handler does its thing;
SysCall handler triggers SysCall ISR to pass control to program;
Above process repeats.

Possibly not the most efficient mechanism possible.

Could be it more efficient to do it more like RISC-V, but multiple sets
of banked registers would be expensive.

But, can be generalized to allow things like COM-style calls between
arbitrary processes without any additional overhead (one needs a
task/thread whose sole existence is merely to handle incoming method
calls on exported COM objects...).

I had planned to rework TKRA-GL to being able to work this way, possibly
also dispatching the request to a GL backend running on a different
core, but haven't gotten this fully implemented yet (this is a bit of a
restructuring effort).

Also the frontend/backend interface isn't quite as straightforward as
naively wrapping every OpenGL call (this would result in excessive
overhead in some cases). Effectively, one needs to keep a lot of state
on the client side, and then preferably only talk to the backend when it
is time to "actually draw something" or similar (so, "glDrawArrays()" or
similar will call into the backend; but glEnable/glDisable/... will not).

There is no standardized interface for such a "OpenGL frontend/backend
COM-object interface" that I am aware of though to use as a design
reference.

>>
> But I don't understand why you would allow Boot to read things that are
> execute only, or to write things that are read-only. ?!? Boot must be as secure
> as anything else, you later you have to add special modes (and crap) so that
> you Boot without allowing bad-actors a shot at the system (Root kit and all that).
> <

Probably at this stage, no one is going to root-kit the SDcard.
This is an issue beyond the scope of what I will address at the moment
though.

There is pretty much nothing the boot ROM can do that would be useful
against a compromised OS kernel.

The most it could do would be to reject booting from untrusted removable
media or similar.

For most of my life though, on the PC side of things, it was sufficient
to be like:
"Is there 55-AA?", "Yes", "Boot it."

I went with something vaguely similar to the RasPi.

Namely:
Check SDCard for a bootloader file ("BOOTLOAD.SYS");
Boot ROM needs to understand FAT32, etc;
If found, load it;
Else, print error message and die.

Where, "BOOTLOAD.SYS" is the same 'PEL4' binary format used by TestKern.
Theoretically, did also add code (untested) for ELF images and similar,
and for more conventional PE/COFF.

If I wanted to get fancy, I could maybe consider allowing BOOTLOAD.SYS
to be like:
#!/bin/tkshell.sys
Or similar.

Or, maybe consider changing it to "BOOTBJX2.SYS" or similar, or maybe
have it default to looking inside a folder (as opposed to the root
directory).

>>>> Say, 128MB of physical-mapped RAM doesn't go very far if one is
>>>> allocating 1MB for stack buffers and similar.
>>> <
>>> As long as your working set is 128KB or smaller it does not mater how
>>> big the allocation is, what matters is the working set.
>> Only if you have virtual memory...
> <
> Which I have by the time that Boot relinquishes control to GuestOS.
> <
>

Seems unnecessary IMO.

Having anything non-trivial set up that the ROM needs to pass off to the
OS kernel, seems like a potential mess (as opposed to starting the
kernel in a more or less "bare metal" state).

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<EUgZL.2295552$vBI8.1111497@fx15.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31662&group=comp.arch#31662

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!npeer.as286.net!npeer-ng0.as286.net!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx15.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Newsgroups: comp.arch
References: <u0f6gf$32irr$1@dont-email.me> <2023Apr4.073909@mips.complang.tuwien.ac.at> <u10pbe$259vd$1@dont-email.me> <2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me> <2023Apr10.175439@mips.complang.tuwien.ac.at> <5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com> <2023Apr10.230314@mips.complang.tuwien.ac.at> <XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me> <ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
Lines: 29
Message-ID: <EUgZL.2295552$vBI8.1111497@fx15.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 11 Apr 2023 17:36:36 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 11 Apr 2023 17:36:36 GMT
X-Received-Bytes: 2188
 by: Scott Lurndal - Tue, 11 Apr 2023 17:36 UTC

BGB <cr88192@gmail.com> writes:
>On 4/11/2023 8:32 AM, Scott Lurndal wrote:
>> BGB <cr88192@gmail.com> writes:
>>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:
>>>> anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>>>> Michael S <already5chosen@yahoo.com> writes:
>>
>>> This being partly because:
>>> Variable size stack frames are evil;
>>> If one excludes large allocations from the stack (including large
>>> arrays), one may find that 128k of stack space is sufficient for most
>>> programs.
>>
>> It's not 1989 anymore.
>>
>
>?...
>
>AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?...

The VAX had a 32-bit flat address space in 1978[*]. The i386 had one by 1985.

Not to mention the dozens of mainframe and minicomputers available with
large memory spaces from the last 1960s.

[*] Although in 1979, 4MB was a large amount of physical memory, VMS
had working sets and paging, as did the 370 successors and most other
mainframe lines. Even the PDP-10 had 256k words (36-bit) of magnetic
core memory.

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<1576a6c6-e119-4368-8232-5f22dbc84416n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31663&group=comp.arch#31663

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5884:0:b0:3e3:8172:ff21 with SMTP id t4-20020ac85884000000b003e38172ff21mr1099946qta.8.1681235222326;
Tue, 11 Apr 2023 10:47:02 -0700 (PDT)
X-Received: by 2002:a05:6871:4d0e:b0:184:52a2:14f6 with SMTP id
ug14-20020a0568714d0e00b0018452a214f6mr2795830oab.2.1681235221972; Tue, 11
Apr 2023 10:47:01 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 11 Apr 2023 10:47:01 -0700 (PDT)
In-Reply-To: <u1454q$2mbg6$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:15c8:5e5c:64f4:ef97;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:15c8:5e5c:64f4:ef97
References: <u0f6gf$32irr$1@dont-email.me> <a533d5c4-8dca-44eb-ba43-bf38ab7f9f34n@googlegroups.com>
<2023Apr4.073909@mips.complang.tuwien.ac.at> <u10pbe$259vd$1@dont-email.me>
<2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me>
<2023Apr10.175439@mips.complang.tuwien.ac.at> <5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com>
<2023Apr10.230314@mips.complang.tuwien.ac.at> <XZ_YL.1523107$8_id.1501370@fx09.iad>
<u12jij$2gd1b$1@dont-email.me> <ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1576a6c6-e119-4368-8232-5f22dbc84416n@googlegroups.com>
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 11 Apr 2023 17:47:02 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3881
 by: MitchAlsup - Tue, 11 Apr 2023 17:47 UTC

On Tuesday, April 11, 2023 at 12:24:46 PM UTC-5, BGB wrote:
> On 4/11/2023 8:32 AM, Scott Lurndal wrote:
> > BGB <cr8...@gmail.com> writes:
> >> On 4/10/2023 4:13 PM, Scott Lurndal wrote:
> >>> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> >>>> Michael S <already...@yahoo.com> writes:
> >
> >> This being partly because:
> >> Variable size stack frames are evil;
> >> If one excludes large allocations from the stack (including large
> >> arrays), one may find that 128k of stack space is sufficient for most
> >> programs.
> >
> > It's not 1989 anymore.
> >
> ?...
>
> AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?....
>
> Where, say:
> CS, program;
> DS = SS, global variables and stack.
> Also heap for "small" or "tiny" model.
> ES, stomped for sake of "far" pointers.
<
You mean 1995...............
>
> Comparably, 128K is massive...
>
But 16GB is standard today. 128K× BIGGER.
<
>
> I have tested, and a lot of stuff does not work with a 16K or 32K stack,
> whereas 64K is borderline (say, Doom works, but Quake overflows the stack).
>
> Meanwhile, 128K usually works, and 256K if one "wants to be safe".
<
Why not just let the stack grow to whatever size it needs to be.
It is relatively easy to put SP = 0x7FFFFFFFFFFFFFFF0 and
...................................... heap = 0x40000000000000000 and
never run out of either. (2^62-bit virtual range.)
<
Virtual memory works, and hides the complexities of doing it the easy way.
<
> Windows typically uses 1MB for the stack, but this seems overkill IME,
> and also Windows always operates with virtual memory enabled.
>
My architecture comes out of reset with the MMUs turned on and working.
Why would you not want virtual memory enabled ??
>

>
> Say, 128MB of physical-mapped RAM doesn't go very far if one is
> allocating 1MB for stack buffers and similar.
<
As long as your working set is 128KB or smaller it does not mater how
big the allocation is, what matters is the working set.
>

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<10076624-4355-4574-86d0-a51dfc2307fcn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31664&group=comp.arch#31664

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ad4:5509:0:b0:5ef:3c87:781b with SMTP id pz9-20020ad45509000000b005ef3c87781bmr43783qvb.8.1681235263256;
Tue, 11 Apr 2023 10:47:43 -0700 (PDT)
X-Received: by 2002:a9d:76c9:0:b0:68b:cd1e:1ef1 with SMTP id
p9-20020a9d76c9000000b0068bcd1e1ef1mr3938856otl.7.1681235262916; Tue, 11 Apr
2023 10:47:42 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 11 Apr 2023 10:47:42 -0700 (PDT)
In-Reply-To: <aWeZL.244207$SdR7.163940@fx04.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=71.230.96.169; posting-account=ujX_IwoAAACu0_cef9hMHeR8g0ZYDNHh
NNTP-Posting-Host: 71.230.96.169
References: <u0f6gf$32irr$1@dont-email.me> <2023Apr4.073909@mips.complang.tuwien.ac.at>
<u10pbe$259vd$1@dont-email.me> <2023Apr10.143646@mips.complang.tuwien.ac.at>
<u118f4$27ckk$1@dont-email.me> <2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com> <2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <74afe76f-5b24-4ad9-8a0d-798af5fb13f2n@googlegroups.com>
<aWeZL.244207$SdR7.163940@fx04.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <10076624-4355-4574-86d0-a51dfc2307fcn@googlegroups.com>
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
From: timcaff...@aol.com (Timothy McCaffrey)
Injection-Date: Tue, 11 Apr 2023 17:47:43 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4525
 by: Timothy McCaffrey - Tue, 11 Apr 2023 17:47 UTC

On Tuesday, April 11, 2023 at 11:21:46 AM UTC-4, Scott Lurndal wrote:
> "robf...@gmail.com" <robf...@gmail.com> writes:
> >On Tuesday, April 11, 2023 at 9:32:07=E2=80=AFAM UTC-4, Scott Lurndal wrote=
> >:
> >> BGB <cr8...@gmail.com> writes:=20
> >> >On 4/10/2023 4:13 PM, Scott Lurndal wrote:=20
> >> >> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:=20
> >> >>> Michael S <already...@yahoo.com> writes:=20
> >>=20
> >> >This being partly because:=20
> >> >Variable size stack frames are evil;=20
> >> >If one excludes large allocations from the stack (including large=20
> >> >arrays), one may find that 128k of stack space is sufficient for most=20
> >> >programs.
> >> It's not 1989 anymore.
> >
> >I may be a bit out of date here, but, I think some rules still apply.
> >Passing large objects like arrays as parameters on the stack is not
> >generally a good idea. It may lead to copying lots of memory around
> >uselessly. Objects can be allocated on the stack but usually they are
> >allocated on the heap especially if they are large, so they can be
> >managed. Allocating them on the stack forces them to be deallocated
> >at method return.
> "forces" is not correct. "allows" is more appropriate.
>
> There's no single answer, but modern stacks are multiple megabytes
> and there is no reason to invoke a heap allocator when the stack
> works perfectly well, particularly for the example above (which
> someone had elided) where the allocated data is only used in
> the function itself. Heap allocation is not overhead free,
> stack allocation is (both are subject to paging residency overhead by
> the OS, of course).
>
> Where the allocation size is unbounded and unknown at compile time
> one may choose at runtime from which (stack or heap) that the memory
> is allocated based on allocation size, or may simply use the heap
> (which also has size constraints, of course.) Posix systems
> have per-process resource limits for both the stack and heap.
>
> 32-bit systems add additional constraints on both heap and
> stack sizes due to the limited virtual address space (2GB or
> 3GB depending on OS configuration).
>
> I generally use mmap() for larger than a page allocations rather than abusing
> the heap allocator (malloc). In bare metal applications where performance
> and reliability is required, pool allocators are generally preferred.

There is a "new" C feature, the cleanup attribute. It causes a cleanup function whenever
a variable goes out of scope:

https://echorand.me/site/notes/articles/c_cleanup/cleanup_attribute_c.html

Better than using alloca() IMNSHO.

- Tim

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<98hZL.388801$cKvc.157093@fx42.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31665&group=comp.arch#31665

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx42.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Newsgroups: comp.arch
References: <u0f6gf$32irr$1@dont-email.me> <u118f4$27ckk$1@dont-email.me> <2023Apr10.175439@mips.complang.tuwien.ac.at> <5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com> <2023Apr10.230314@mips.complang.tuwien.ac.at> <XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me> <ljdZL.420088$5S78.182599@fx48.iad> <74afe76f-5b24-4ad9-8a0d-798af5fb13f2n@googlegroups.com> <aWeZL.244207$SdR7.163940@fx04.iad> <10076624-4355-4574-86d0-a51dfc2307fcn@googlegroups.com>
Lines: 57
Message-ID: <98hZL.388801$cKvc.157093@fx42.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 11 Apr 2023 17:53:09 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 11 Apr 2023 17:53:09 GMT
X-Received-Bytes: 3626
 by: Scott Lurndal - Tue, 11 Apr 2023 17:53 UTC

Timothy McCaffrey <timcaffrey@aol.com> writes:
>On Tuesday, April 11, 2023 at 11:21:46=E2=80=AFAM UTC-4, Scott Lurndal wrot=
>e:
>> "robf...@gmail.com" <robf...@gmail.com> writes:=20

>> >Passing large objects like arrays as parameters on the stack is not=20
>> >generally a good idea. It may lead to copying lots of memory around=20
>> >uselessly. Objects can be allocated on the stack but usually they are=20
>> >allocated on the heap especially if they are large, so they can be=20
>> >managed. Allocating them on the stack forces them to be deallocated=20
>> >at method return.
>> "forces" is not correct. "allows" is more appropriate.=20
>>=20
>> There's no single answer, but modern stacks are multiple megabytes=20
>> and there is no reason to invoke a heap allocator when the stack=20
>> works perfectly well, particularly for the example above (which=20
>> someone had elided) where the allocated data is only used in=20
>> the function itself. Heap allocation is not overhead free,=20
>> stack allocation is (both are subject to paging residency overhead by=20
>> the OS, of course).=20
>>=20
>> Where the allocation size is unbounded and unknown at compile time=20
>> one may choose at runtime from which (stack or heap) that the memory=20
>> is allocated based on allocation size, or may simply use the heap=20
>> (which also has size constraints, of course.) Posix systems=20
>> have per-process resource limits for both the stack and heap.=20
>>=20
>> 32-bit systems add additional constraints on both heap and=20
>> stack sizes due to the limited virtual address space (2GB or=20
>> 3GB depending on OS configuration).=20
>>=20
>> I generally use mmap() for larger than a page allocations rather than abu=
>sing=20
>> the heap allocator (malloc). In bare metal applications where performance=
>=20
>> and reliability is required, pool allocators are generally preferred.
>
>
>There is a "new" C feature, the cleanup attribute. It causes a cleanup fun=
>ction whenever
>a variable goes out of scope:
>
>https://echorand.me/site/notes/articles/c_cleanup/cleanup_attribute_c.html

For the most part, I use C++ which has had cleanup functions
from day one.

>
>Better than using alloca() IMNSHO.

If you are fortunate enough to have access to a compiler
that supports the new standard cleanup attribute; we're still using gcc 4.8.

And GCC has had a similar attribute for many years, albeit non-portable.

__attribute__ (cleanup(function))

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<BghZL.388802$cKvc.221021@fx42.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31666&group=comp.arch#31666

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!peer03.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx42.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
Newsgroups: comp.arch
References: <u0f6gf$32irr$1@dont-email.me> <2023Apr10.143646@mips.complang.tuwien.ac.at> <u118f4$27ckk$1@dont-email.me> <2023Apr10.175439@mips.complang.tuwien.ac.at> <5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com> <2023Apr10.230314@mips.complang.tuwien.ac.at> <XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me> <ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me> <EUgZL.2295552$vBI8.1111497@fx15.iad> <a85d3e0c-e0fd-4569-b7c9-2779ab298849n@googlegroups.com>
Lines: 72
Message-ID: <BghZL.388802$cKvc.221021@fx42.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 11 Apr 2023 18:02:09 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 11 Apr 2023 18:02:09 GMT
X-Received-Bytes: 3631
 by: Scott Lurndal - Tue, 11 Apr 2023 18:02 UTC

MitchAlsup <MitchAlsup@aol.com> writes:
>On Tuesday, April 11, 2023 at 12:36:39=E2=80=AFPM UTC-5, Scott Lurndal wrot=
>e:
>> BGB <cr8...@gmail.com> writes:=20
>> >On 4/11/2023 8:32 AM, Scott Lurndal wrote:=20
>> >> BGB <cr8...@gmail.com> writes:=20
>> >>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:=20
>> >>>> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:=20
>> >>>>> Michael S <already...@yahoo.com> writes:=20
>> >>=20
>> >>> This being partly because:=20
>> >>> Variable size stack frames are evil;=20
>> >>> If one excludes large allocations from the stack (including large=20
>> >>> arrays), one may find that 128k of stack space is sufficient for most=
>=20
>> >>> programs.=20
>> >>=20
>> >> It's not 1989 anymore.=20
>> >>=20
>> >=20
>> >?...=20
>> >=20
>> >AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?.=
>..
>> The VAX had a 32-bit flat address space in 1978[*]. The i386 had one by 1=
>985.=20
>>=20
>> Not to mention the dozens of mainframe and minicomputers available with=
>=20
>> large memory spaces from the last 1960s.=20
><
>CDC 6600, 7600, CRAY 1, 1S, XMP, YMP,
>IBM 360s, 370s, 30x0s,=20
>Univac 1108,

You left out all the Burroughs boxen, not flat, but large.

>S.E.L., InterData 32,=20
>PDP 6, PDP 10, PDP 11, VAX, Alpha,
>All RISC architectures,
>:: all had flat address spaces.
>>=20
>> [*] Although in 1979, 4MB was a large amount of physical memory, VMS=20
>> had working sets and paging, as did the 370 successors and most other=20
>> mainframe lines. Even the PDP-10 had 256k words (36-bit) of magnetic=20
>> core memory.
><
>When I bought my first computer in 1995, It came with 4 MB, and after using=

I had an Amiga 1000 in 1986, and had a motorola 88k VME box (SVR3) from 1992-1997
that I brought home from work when we replaced them with Unisys S/8400 boxes.

>=20
>it for 2 days, I went out and bought 16MB more. Since windows 3.1 did not
>use more than 16 MB, I configured the other 4MB as the disk cache, and=20
>turned off the swapper. My 33 MHz 486 outran my wife's 100 MHz Pentium.

My first owned computer was a Pentium Pro dual processor system using
the providence mobo (homebuilt):

https://www.amazon.com/PR440FX-PROVIDENCE-PENTIUM-UWSCSI-MOTHERBOARD/dp/B00MX3PBZG

Replaced 7 years later with an IBM 2 processor intel server.

><
>The real question is why anyone would want something other than a large fla=
>t=20
>address space ??

Indeed.

Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

<bc7cc673-6b67-4caa-813c-25cabe546bb4n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=31667&group=comp.arch#31667

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:5b01:0:b0:3e6:71d6:5d42 with SMTP id m1-20020ac85b01000000b003e671d65d42mr4023457qtw.1.1681237708067;
Tue, 11 Apr 2023 11:28:28 -0700 (PDT)
X-Received: by 2002:a05:6808:4d2:b0:386:b6a7:c093 with SMTP id
a18-20020a05680804d200b00386b6a7c093mr4337245oie.6.1681237706324; Tue, 11 Apr
2023 11:28:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 11 Apr 2023 11:28:26 -0700 (PDT)
In-Reply-To: <BghZL.388802$cKvc.221021@fx42.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:15c8:5e5c:64f4:ef97;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:15c8:5e5c:64f4:ef97
References: <u0f6gf$32irr$1@dont-email.me> <2023Apr10.143646@mips.complang.tuwien.ac.at>
<u118f4$27ckk$1@dont-email.me> <2023Apr10.175439@mips.complang.tuwien.ac.at>
<5a6c05d3-c011-4d2c-84c4-057afe0b5749n@googlegroups.com> <2023Apr10.230314@mips.complang.tuwien.ac.at>
<XZ_YL.1523107$8_id.1501370@fx09.iad> <u12jij$2gd1b$1@dont-email.me>
<ljdZL.420088$5S78.182599@fx48.iad> <u1454q$2mbg6$1@dont-email.me>
<EUgZL.2295552$vBI8.1111497@fx15.iad> <a85d3e0c-e0fd-4569-b7c9-2779ab298849n@googlegroups.com>
<BghZL.388802$cKvc.221021@fx42.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bc7cc673-6b67-4caa-813c-25cabe546bb4n@googlegroups.com>
Subject: Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 11 Apr 2023 18:28:28 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: MitchAlsup - Tue, 11 Apr 2023 18:28 UTC

On Tuesday, April 11, 2023 at 1:02:13 PM UTC-5, Scott Lurndal wrote:
> MitchAlsup <Mitch...@aol.com> writes:
> >On Tuesday, April 11, 2023 at 12:36:39=E2=80=AFPM UTC-5, Scott Lurndal wrot=
> >e:
> >> BGB <cr8...@gmail.com> writes:=20
> >> >On 4/11/2023 8:32 AM, Scott Lurndal wrote:=20
> >> >> BGB <cr8...@gmail.com> writes:=20
> >> >>> On 4/10/2023 4:13 PM, Scott Lurndal wrote:=20
> >> >>>> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:=20
> >> >>>>> Michael S <already...@yahoo.com> writes:=20
> >> >>=20
> >> >>> This being partly because:=20
> >> >>> Variable size stack frames are evil;=20
> >> >>> If one excludes large allocations from the stack (including large=20
> >> >>> arrays), one may find that 128k of stack space is sufficient for most=
> >=20
> >> >>> programs.=20
> >> >>=20
> >> >> It's not 1989 anymore.=20
> >> >>=20
> >> >=20
> >> >?...=20
> >> >=20
> >> >AFAIK, back then stack sizes then were usually smaller, say, 8K or 16K?.=
> >..
> >> The VAX had a 32-bit flat address space in 1978[*]. The i386 had one by 1=
> >985.=20
> >>=20
> >> Not to mention the dozens of mainframe and minicomputers available with=
> >=20
> >> large memory spaces from the last 1960s.=20
> ><
> >CDC 6600, 7600, CRAY 1, 1S, XMP, YMP,
> >IBM 360s, 370s, 30x0s,=20
> >Univac 1108,
>
> You left out all the Burroughs boxen, not flat, but large.
<
Intentionally ! I also left out ICL, Burroughs 5000 and 6000, GE 645, ...
>
>
> >S.E.L., InterData 32,=20
> >PDP 6, PDP 10, PDP 11, VAX, Alpha,
> >All RISC architectures,
> >:: all had flat address spaces.
> >>=20
> >> [*] Although in 1979, 4MB was a large amount of physical memory, VMS=20
> >> had working sets and paging, as did the 370 successors and most other=20
> >> mainframe lines. Even the PDP-10 had 256k words (36-bit) of magnetic=20
> >> core memory.
> ><
> >When I bought my first computer in 1995, It came with 4 MB, and after using=
>
> I had an Amiga 1000 in 1986, and had a motorola 88k VME box (SVR3) from 1992-1997
> that I brought home from work when we replaced them with Unisys S/8400 boxes.
<
So, you had one of my 88K machines.....................interdesting.............
<
I use the word "my" because that was pretty much my ISA, pipeline, and interconnect.
>
> >=20
> >it for 2 days, I went out and bought 16MB more. Since windows 3.1 did not
> >use more than 16 MB, I configured the other 4MB as the disk cache, and=20
> >turned off the swapper. My 33 MHz 486 outran my wife's 100 MHz Pentium.
> My first owned computer was a Pentium Pro dual processor system using
> the providence mobo (homebuilt):
>
> https://www.amazon.com/PR440FX-PROVIDENCE-PENTIUM-UWSCSI-MOTHERBOARD/dp/B00MX3PBZG
>
> Replaced 7 years later with an IBM 2 processor intel server.
>
> ><
> >The real question is why anyone would want something other than a large fla=
> >t=20
> >address space ??
>
> Indeed.


devel / comp.arch / Re: On the pitfalls of C and UB: C23 seems to be even worse. :-(

Pages:123456789
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor