Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!rpi!dali.cs.montana.edu!milton!uw-beaver!sumax!polari!rwing!seaeast!burklabs!ronb From: ronb@burklabs (Ron Burk ) Newsgroups: comp.lang.c++ Subject: Re: Portable C++ pointer/handle or memory management Message-ID: Date: 20 Oct 90 15:02:45 GMT References: <1990Oct10.170534.1162@efi.com> Organization: Burk Labs, Kirkland WA Lines: 24 chiu@efi.com (Chan Chiu) writes: > I am going to develope a portable software using C++. The target systems are > Mac, PC/Windows and Unix. > ... > In general, I like to know your experience developing portable program in > above environments. > My experience is: I gave up. My goals were the same as yours and I eventually decided there was no way to make my application clean and still use both Windows, Mac, and "ordinary" memory management. While the Mac has a simple double-indirection scheme, Windows forced you to execute several instructions to "lock" a piece of memory in order to obtain a pointer. Recently, however, Microsoft documented the more efficient "segment table" scheme that they apparently had been reserving to give their own applications a competitive edge. That method is also difficult to adapt to C++ objects in a clean way (are you willing to make your Unix version significantly slower because it is portable?). My conclusion: I decided I'd rather bet that everybody is going to move to Windows 3.0 with a 386 machine and 2 Meg of memory. Then they can run my application, which will assume virtual memory. Let me know if you have more success than I did.