Article View: comp.sys.next.programmer
Article #2288Re: Memory Management NeXT/Windows
From: Peter Kron
Date: Sun, 24 Jan 1993 02:04
Date: Sun, 24 Jan 1993 02:04
37 lines
2059 bytes
2059 bytes
> From: yikes@netcom.com (Michael Brill) > Message-ID: <1993Jan23.040747.11897@netcom.com> > > I'm developing an app on the NeXT that I'd like to take the bulk > of to either Windows and/or Macintosh. I think I know how to > port everything but the UI and memory management. > > As far as the UI goes, I'm not going to worry about now. What I > am worried about is memory management. I've scanned through the > Windows docs and understand how memory management works there > (getting handle, locking, operating, unlocking) and I'm looking > for an established scheme to make the port seamless between Unix > and Windows/Mac. If you assume Windows 3.0 on a 386/486...it is pretty seamless. Because memory is segmented, you must be careful of crossing 64K boundaries with data, but unless you have very large objects that isn't a big deal. If you do, you should break them up yourself. You should also make sure you efficiently suballocate the segments... some heap allocators will allocate each far (32-bit) address into a separate segment (ie, the most signficant 16 address bits). Win 3.0 only has 8K segments total for all code and data (not just your app) so this gets to be a scarce resource. If you don't realloc blocks, (especially from <64K to >64K) you can ignore the lock/unlock...leave everything locked. If you run Windows 1.x, 2.x, real mode or on a 286, write for the 386 anyway. They won't be supported by the time you finish your app. The Mac is trickier...target users with lots of memory and hope Apple develops real virtual memory soon. --------------- Peter Kron Corona Design, Inc. Peter_Kron@corona.wa.com
Technical Details
Message-ID:
<19.UUL1.3#16216@corona.wa.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!nwnexus!korona!pkronReferences:
<1993Jan23.040747.11897@netcom.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!nwnexus!korona!pkron From: pkron@corona.wa.com (Peter Kron) Newsgroups: comp.sys.next.programmer Subject: Re: Memory Management NeXT/Windows Message-ID: <19.UUL1.3#16216@corona.wa.com> Date: Sat, 23 Jan 93 19:04:43 PDT References: <1993Jan23.040747.11897@netcom.com> Organization: Corona Design, Inc., Seattle, WA Reply-To: pkron@corona.wa.com Lines: 38