Why doesn’t Windows use 64-bit virtual address space below 0x00000000`7ffe0000?
devblogs.microsoft.com
devblogs.microsoft.com
I don't see any good reason for this. My own half assed explanation is they're enforcing 32b cleanliness. It's not a very good explanation. But it's my explanation for something I don't like.
1. Try to recompile on 64bit without any changes 2. Realize the program does not work because the types have different sizes now 3. Cast everything on sight to types that have same size as in 32bit. 4. Now the program "works" (as in, it compiled and maybe ran but you didn't test thoroughly)
This address space restrictions ensures that if you happen to cast a pointer in this way it will not work, forcing the developer to review what he's doing.
So I would like an explanation from Apple for why this now. What is their rationale?
The same reasons GP offered still apply there. The amount of software directly ported from x86_64 to AArch64 was probably minimal.
Which is why on windows they defaulted to 32 bits for ints
Such an enormous amount of time in C/C++ programming is devoted to accounting for the size of an int, long, wchar_t, and long long being unreliable when porting.
This is why D has int fixed at 32 bits, long fixed at 64 bits. It's amazing how the problems just melt away.
Now, just remember to use size_t for everything used as an index, and you're good to go. (ptrdiff_t is almost never needed.)
IMO it helps to write programs from the ground up that you know will need to be cross compiled.
Besides, the C Standard Library doesn't even use stdint.h. Now you've got unknown implicit integer conversions going on. It's just not a solution.
segaddr blah conflicts with pagezero_size
Maybe there was an incantation I didn't find. But I did handcraft it and then Apple cancelled even that. Now we're gonna have to deal with a 4GB zero page. Period.Title: Instead of a C++ template parlor trick, why not just add support based on whether the header file has already been included?
Subtitle: Header file inclusion order dependencies
A company in Ireland I worked for gave a mobile phone GIS demo to the Irish national phone company and Digital lent us a beefy server with two AXP CPUs (it was gonna be the future!) running windows NT. We literally pulled it on cobbled dublin streets on a a handcart to bring it to their offices.
Seems to indicate that the Release Candidate 3 builds for Alpha never made it out through official channels. I'm pretty sure beta and RC was one disc per flavor and architecture though: so x86 professional, x86 server, etc, and alpha pro/server/etc. A big bundle of discs would come from Redmond.
I know nt4 had all the archs on the release disc, but I don't think that was the plan for win2k
Mostly used a DEC Alpha as a "visible" competitor to our major server provider at the time (Compaq) to try and manage the prices they were charging (at least until Compaq bought Digital, and then eventually bought by/merged with HP).
One interesting thing was that we had a faulty RAM chip that we only discovered due to a bug in website publishing to IIS causing a big memory leak which crashed the server. Once the the chip was replaced, we still had the underlying leak - but at least the server didn't crash any more.
I didn't know there was a vdso-like mechanism in Windows as in Linux.
https://learn.microsoft.com/en-us/windows-hardware/drivers/d...
Aw, man. I recently found out there is also a similar restriction on Linux. Bummer, because I have a good use for putting code into the lower 64KB of memory (not 4KB, still want to use that for catching NPEs). My use case is a fast interpreter for bytecode. Since every bytecode handler needs an entry in the dispatch table, and I have 7--yes 7!--dispatch tables, I'd like to make their entries 2 bytes. So instead of taking 1KB each, they would take only 512B each. But alas.
Another great use case is Wasm. Since the memory is a sandboxed 4GB range and only indexed into by 32-bit offsets, placing it at virtual address 0 would save an add instruction (or use of segment register) on every access.
Made for some borked code with Clozure Common Lisp when people started running 64kB pagesize on PPC64, and that meant that even with minimal zero page it still was too big to map the "low memory" where CCL stuck it's NULL definition.
Hmm. If the upper half of the handler addresses are the same, then why not store just the lower 2-bytes of each handler address in the dispatch table. If you're on x86, there's no add needed if the upper bytes of the register you're loading into already contain the upper half of the address, for example:
mov eax, HANDLER_BASE
mov ax, [edi + ebx]In particular, it would be nice to have userspace programs be able to take advantage of new/larger registers without requiring the OS kernel to support the extra CPU state. If the firmware (which presumably is available as soon as the new CPU ships) handles the context switch, then the OS kernel doesn't need an update.
L4/Alpha PALcode was limited to specific set of CPUs it was implemented for, so unlike VMS, NT or Digital Unix PALcode it wasn't available outside of those few machines.
Interesting Raymond continues to mention NT/Alpha now and then. If you run into him mention I have a collection of NT/Alpha artifacts and anecdotes he might be interested in.
They used to work very hard to make sure updates didn't break popular programs that used undocumented hacks.
Obsessively.
I worked for a company that sold a security auditing tool. We cared very much about which version of Windows we were running on. When Microsoft came out with the next version of Windows and to our dismay, we found out that our software recognized it as the old version.
Turns out that Microsoft had found (pre release) that the new version broke our software. It reported "unknown version" or something. So they added us to a long list of applications that, when those applications asked for what version of Windows they were running on, Windows lied and told them an earlier version.
It cost us some heartburn to work around Windows trying to be helpful to us...
You'd be shocked at how much software enables features based on a `==` OS version check. When the OS bumps its version, the software regresses to some earlier behavior. Lying to the app is the simplest way to keep it working.