home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / msdos / programm / 12358 < prev    next >
Encoding:
Text File  |  1993-01-23  |  3.9 KB  |  83 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!mcsun!fuug!kiae!demos!jvdrd!kvitekp
  3. From: kvitekp@jvd.msk.su (Pete Kvitek)
  4. Subject: Re: Problem with Phar Lap LITE
  5. Message-ID: <1993Jan22.193337.1531@jvd.msk.su>
  6. Organization: JV Dialogue, Moscow
  7. References: <1993Jan21.171555.20186@reks.uia.ac.be>
  8. Date: Fri, 22 Jan 1993 19:33:37 GMT
  9. Lines: 72
  10.  
  11. derijkp@reks.uia.ac.be (Peter De Rijk) writes:
  12. : I am trying to use memory >640K in C. I am trying out the 'LITE' version of 
  13. : DOS extender from Phar Lap. (I do not want to by the full version until I know
  14. : it will work with my program.) While doing some testing I encountered some 
  15. : ennoying problems:
  16. : I can only allocate 13 blocks using farmalloc. Even when I do have enough
  17. : memory left, the 14th farmalloc returns NULL. Is this a limitation of the
  18. : LITE version only (it is not described as such.), or is something else wrong.
  19. : By freeing or reallocating using farmalloc, farrealloc and farfree memory can 
  20. : get 'lost'. e.g. Suppose I want to gradually increase the amount of memory in
  21. : an allocated block (as I said, just testing purposes). When I make a block 
  22. : bigger by reallocating I can get about 1 megabyte. When make it bigger by 
  23. : freeing it, and allocating the larger block, I only get to about halve a meg.
  24. : I see following possible solutions to the problem:
  25. : Since I am definately not a DOS guru, I am doing something terribly wrong with 
  26. : the dos extender. If someone tells me what, I can correct this and get all 
  27. : singing, all dancing memory allocation >640K.
  28. : I allocate one big block of memory in the beginning of the program, and do all
  29. : memory management myself. I'm not really anxious to do this. To do it properly 
  30. : it would require a rather big amount of work and time. So if someone else has
  31. : already done this, and is willing to give it to me, ...
  32. : Someone else has had the same problem, and has found a solution I haven't even 
  33. : thought about.
  34. : The problem is really driving me mad, and if someone has any idea how to solve 
  35. : it, it would be enourmously appreciated.
  36. : Peter
  37. : PS. I've just read a post about someone using MSC 7.00 and a 'virtual memory
  38. : manager'. Does this do what I want: use extended memory, allocate large blocks
  39. : of memory under DOS. If so, maybe I should convert to MSC.
  40.  
  41.  
  42. I don't use PL's Dos Extender but probably i can help you another way...
  43.  
  44. Recenly i wrote a NEWEXE file loader which supports DPMI -- so anyone who has
  45. linker capable to produce NEWEXE files can run large model programs in 
  46. protected mode... MS's LINK, Borland's TLINK and Zortech's BLINK can do.
  47.  
  48. But if you want to use high level language like C you need a bit more -- 
  49. the runtime libraries which are protected mode clean. Since i'm mostly using
  50. Borland's C++ 2.00 -- i modified its runtime libraries to run in protected
  51. mode... But that's not the end of the story -- standard heap allocation 
  52. routines are absolutely not compatible with protected mode since they
  53. rely on a heap being the consequent block of memory -- which is not possible
  54. in protected mode or is not reasonable at least. So i developed another heap
  55. manager -- it just came through the extensive stress tests and seems to be 
  56. fine. It may be used with any compiler... As for modified BC runtime libs --
  57. soon i upgrade them to 3.xx version of BC.
  58.  
  59. So now there is alternative for PL's stuff but it requires external DPMI
  60. host -- QD's QDPMI 1.01, MS WIndow Dos box and OS/2 2.0 dos box will do.
  61. Did not check it with 328MAX from Qualitas though... since i dont have 
  62. it. (anyone can help by running test routines under it? you're welcome..)
  63.  
  64. Tell me if you're interested...   
  65. --
  66.  
  67. Pete Kvitek <kvitekp@jvd.msk.su>, FidoNet(tm) 2:5020/6 | Phone:+7-095-328-1327
  68. Speaking from but not for JV Dialogue, Moscow, Russia  | Fax:  +7-095-329-4711
  69. -- 
  70.  
  71. Pete Kvitek <kvitekp@jvd.msk.su>, FidoNet(tm) 2:5020/6 | Phone:+7-095-328-1327
  72. Speaking from but not for JV Dialogue, Moscow, Russia  | Fax:  +7-095-329-4711
  73.