Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!apple!netcom!mojo From: mojo@netcom.UUCP (Morris Jones) Newsgroups: comp.windows.ms.programmer Subject: Re: 386 Enhanced Question Keywords: Memory 386 Protected mode Message-ID: <19202@netcom.UUCP> Date: 20 Dec 90 22:55:42 GMT References: <4566@media-lab.MEDIA.MIT.EDU> Organization: Netcom- The Bay Area's Public Access Unix System {408 241-9760 guest} Lines: 26 jason@media-lab.MEDIA.MIT.EDU (Jason A. Kinchen) writes: >When the documentation says that you have a 4 Gig address space in 386 >Enhanced mode, how's it doing that? The MS C compiler is only making >16 bit code and not using the 32 bit segment registers on the 386, so >what gives? I guess the Windows Global heap might be using a 32 bit >register, but how's it getting a 32 bit pointer back into the MS C >compiled application? Yes the MS C compiler is making 16-bit code. Windows all runs in 16-bit code segments. But each of those segments can be up to 64K in size, and you can have LOTS of them. So you can actually use 4 Gig of address space. Remember that on the 386 you don't have a segment number, you have a Selector (or Descriptor). This number is not a memory reference, but an index into a table which describes the physical memory address being used. Thus a 16:16 pointer can refer to any address in the physical (or virtual) address space. You can use all of memory with 16:16 pointers in selector:offset form. Mojo -- mojo@netcom.UUCP Site Coordinating Instructor, San Jose South Morris "Mojo" Jones Skilled Motorcycling And Rider Training (S.M.A.R.T.) Campbell, CA 800-675-5559 ... 800-CC-RIDER ... 408-423-2212 AA4KB @ N6LDL.#NOCAL.CA.USA.NA / aa4kb.ampr.org / netcom!mojo@apple.com