CompuServe Thread

#Win32s data

3 messages in this thread
#50365From: Mike Markley [MS]Aug 2, 1993 10:12 AM
David, Memory allocations under Win32s are always above the 2Gb point. It is not possible to get memory below this address. The recommended solution is to use the low bit as a mark bit. You can use the GetSystemInfo() API to determine the upper and lower limits of application address space. Thanks, Michael Markley [Microsoft Developer Support] There is 1 Reply.
#50464From: David ConnellyAug 2, 1993 11:16 PM
> Memory allocations under Win32s are always above the 2Gb point. It is not > possible to get memory below this address. The recommended solution is to use > the low bit as a mark bit. You can use the GetSystemInfo() API to determine > the upper and lower limits of application address space. Unfortunately, we already use the bottom two bits to represent type information. Oh well, it only means I will have to have two GC scanning loops: one for Windows NT where the top mark bit will be set, and another for Windows 3.1 where the top bit will be clear when marked. Probably not that serious after all. By the way, do you know if using TLS (thread local storage) would be a way to provide separate instance data for a DLL under Win32s? Theoretically, it seems like it should work. Thanks, David There is 1 Reply.
#50749From: Mike Markley [MS]Aug 4, 1993 12:29 PM
David, You can use the Tls API's and you can also declare variables as __declspec(thread). Version 1.1 of Win32s supports the __declspec(thread) modifier. For more information on __declspec(thread) see the modif.hlp file. There is an icon labeled Storage Class Modifier QuickRef in the Online References group that is created by the SDK installation. Thanks, Michael Markley [Microsoft Developer Support]