home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / win32 / 3028 < prev    next >
Encoding:
Text File  |  1993-01-23  |  1.6 KB  |  45 lines

  1. Newsgroups: comp.os.ms-windows.programmer.win32
  2. Path: sparky!uunet!microsoft!hexnut!johnhall
  3. From: johnhall@microsoft.com (John Hall)
  4. Subject: Re: 16-bit Windows 3.1 vs Win32s thunking
  5. Message-ID: <1993Jan22.223924.25330@microsoft.com>
  6. Date: 22 Jan 93 22:39:24 GMT
  7. Organization: Microsoft Corporation
  8. References: <1993Jan21.020250.29619@emr1.emr.ca>
  9. Lines: 31
  10.  
  11. I'm just adding my $.02 to what alistair said.
  12.  
  13. In article jagrant@emr1.emr.ca (John Grant) writes:
  14. | So what's the difference?
  15. | -------------------------
  16. | If the NT app is still doing the same thing as the 16-bit app compiled
  17. | under Windows 3.1, i.e. switching pointers back & forth between linear
  18. | and segmented values, then what is the point of Win32s at least for
  19. | the memory stuff.
  20.  
  21. Huge pointers are 16:16 addresses with compiler support for 
  22. increasing the offset (the upper 16bits) when necessary.
  23. This means that incrementing a huge pointer is a function call.
  24.  
  25. Win32s lets you use, essentially, real 32bit pointers.  This
  26. means that when you increment a pointer in Win32s code, you
  27. add one to a variable.
  28.  
  29. For code that manipulates in memory structures a lot, the
  30. code speadup between the two models is very large.  It more
  31. than offsets for the overhead of switching from the 32bit
  32. address to a 16:16 address when calling a Windows 3.1 function.
  33.  
  34. There are other advantages to a Win32s process.  I believe
  35. sparse memory will be supported in the final release, 
  36. for example.
  37.  
  38.  
  39.  
  40. -- 
  41. -------------------------
  42. My comments are my own.  They are independent and unrelated to the
  43. views of my company , relatives or elected representatives.
  44.  
  45.