home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / next / programm / 8278 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  2.0 KB

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