home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / misc / 2518 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  1.8 KB

  1. Path: sparky!uunet!math.fu-berlin.de!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!dfv.rwth-aachen.de!sungate.fido.de!p1.hippo.fido.de!eurologic.fido.de!Martin_Schloeter
  2. Date: Fri, 28 Aug 92 09:59:52 +0200
  3. From: Martin_Schloeter@eurologic.fido.de (Martin Schloeter)
  4. Subject: Re: Windows == OS
  5. Message-ID: <197a1eed@p3.f67.n245.z2.fidonet.org>
  6. Newsgroups: comp.os.ms-windows.misc
  7. X-Comment-To: tguez@jade.tufts.edu (Name)
  8. Organization: Die ersten 100.000 Jahre... 
  9. Lines: 24
  10.  
  11. N > Execuse me!!!!  Windows WILL NOT touch your malloc memory blocks,
  12. N > and it will sort of juggle with your memory only with near pointers and
  13. N > that is also only because you got the same DS value; that is it does
  14. N > not play with your memory blocks in relation to your malloc calls, it
  15. N > will move your WHOLE program by changing the base address.  Compile
  16. N > in the compact or huge models where everything is far and windows will
  17. N > die a horrible death if it tried to play with it.
  18. N > 
  19. You are definitly wrong. 
  20. Don't mix it up. You description is only correct for static data in the apps 
  21. default data segment(s) and data allocated with the default malloc (identically 
  22. with LocalAlloc-LocalLock) in the Local Heap (which is inside the default data 
  23. segment(s)). Even this problem is better managed with Win 3.1 then with 3.0 (no 
  24. more sandbank effekt with such memory).
  25. Memory allocated with GlobalAlloc-Global lock (also far pointers) is perfectly 
  26. juggled by windows.
  27. Simply write an app which uses such call, start heapwalker and make some memory 
  28. intensive things and you will see your memory blocks juggling around.
  29. And to say it again. Is not aspect of the system design, that malloc of the 
  30. C-Library is translated to LOCALAlloc-LOCALLock, that a decision of the 
  31. compiler factorer. You can make simply a new malloc which works in the Global 
  32. Heap (with real juggling and so on).
  33.  
  34. Martin
  35.