Live data from Hacker News

Why doesn’t Windows use 64-bit virtual address space below 0x00000000`7ffe0000?

devblogs.microsoft.com

31–40 of 65 posts

Re: Why doesn’t Windows use 64-bit virtual address space below 0x00000000`7ffe0000?

#31

Has anyone here ever used Windows NT on a DEC Alpha? 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.

Hand delivering servers and other gear is always a part of a good story. Makes me wish for a decent cart and maybe some brakes.

Re: Why doesn’t Windows use 64-bit virtual address space below 0x00000000`7ffe0000?

#32

Has anyone here ever used Windows NT on a DEC Alpha? 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.

I had a Customer in 2000 using SQL Server 7.0 on Windows NT 4.0 on an Alphaserver 1200. The performance, as compared to contemporary x86 machines, was very good. Was it worth the cost? I don’t know. I never did a dollars to performance benchmark. I suspect it wasn’t really worth the DEC tax.

Re: Why doesn’t Windows use 64-bit virtual address space below 0x00000000`7ffe0000?

#33
> That is a special page of memory that is mapped read-only into user mode from kernel mode, and it contains things like the current time, so that applications can get this information quickly without having to take a kernel transition. This page is at a fixed location for performance reasons.

I didn't know there was a vdso-like mechanism in Windows as in Linux.

Re: Why doesn’t Windows use 64-bit virtual address space below 0x00000000`7ffe0000?

#34

Earlier quoted context omitted.

Chen is the poster boy for backwards compat. They used to work very hard to make sure updates didn't break popular programs that used undocumented hacks.

> 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 h…

I frequently implemented this from the other side at Apple.

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.

Re: Why doesn’t Windows use 64-bit virtual address space below 0x00000000`7ffe0000?

#35
post #27

Earlier quoted context omitted.

What was the overlap of both products being commercially available? I didn't think it was too long.

Wikipedia says it was only commercially available for NT4, I do somewhere have the Dec Alpha Windows 2000 beta discs (It got killed very late in the beta).

A friend of mine had an Alpha, and I was getting the Windows betas (I got 98se, 2000, and XP, and then nothing else). My friend was really happy to 'borrow' the win2k for alpha discs. IIRC, release candidates 1 and 2 had alpha discs, and then 3 and beyond didn't; but I might be off by one. I assume it would have shipped as part of the release if only Alpha was cancelled a couple months later.

Re: Why doesn’t Windows use 64-bit virtual address space below 0x00000000`7ffe0000?

#36
post #26

Earlier quoted context omitted.

This was only 'enforced' by the linker on x86. You could handcraft a Mach-O executable to get around it. But it is now enforced enforced by OSX on ARM. 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.

You didn’t need to handcraft it, the linker has a ‘pagezero_size’ argument which allows you to set it as small as one page and then the rest of the low 4GB can be used.

I remember trying this repeatedly with various incantations but always getting:

  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.

Re: Why doesn’t Windows use 64-bit virtual address space below 0x00000000`7ffe0000?

#37

Earlier quoted context omitted.

This was only 'enforced' by the linker on x86. You could handcraft a Mach-O executable to get around it. But it is now enforced enforced by OSX on ARM. 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.

When migrating 32bit apps to 64bit platforms, it's common to follow the recipe: 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…

This argument is similar to my enforcing 32b cleanliness. Really, that was an issue back in the 90s. But this enforcement happened with the x86_64 to ARMv8 migration, 64b to 64b.

So I would like an explanation from Apple for why this now. What is their rationale?

Re: Why doesn’t Windows use 64-bit virtual address space below 0x00000000`7ffe0000?

#38

Earlier quoted context omitted.

That’s the convention on windows for denoting 64-bit addresses, separating the two 32bit parts with the backtick. Don’t recall why now.

I assume it just makes the address easier to read. I imagine most programs don’t deal with address spaces larger than 4GB, so being able to quickly identify the lower bytes of the address when physically looking at a memory address is probably quite handy.

C++14 allows you to add apostrophes (') to numeric literals anywhere you want (presumably you do so at regular and rational intervals, but you don't have to).

Re: Why doesn’t Windows use 64-bit virtual address space below 0x00000000`7ffe0000?

#39

Has anyone here ever used Windows NT on a DEC Alpha? 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.

In 1998-99, I worked at a company where we had an Alpha running Windows NT Server. The company was a large DEC customer and we had tons of Alpha servers sitting around.

Re: Why doesn’t Windows use 64-bit virtual address space below 0x00000000`7ffe0000?

#40

Earlier quoted context omitted.

When migrating 32bit apps to 64bit platforms, it's common to follow the recipe: 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…

This argument is similar to my enforcing 32b cleanliness. Really, that was an issue back in the 90s. But this enforcement happened with the x86_64 to ARMv8 migration, 64b to 64b. So I would like an explanation from Apple for why this now. What is their rationale?

The first iPhones were AArch32, and there was likely a sizable contingent of iOS software that was written to target the only existing bitness at the time :)

The same reasons GP offered still apply there. The amount of software directly ported from x86_64 to AArch64 was probably minimal.

Post reply on HN