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

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!mcsun!ub4b!reks.uia.ac.be!derijkp
  3. From: derijkp@reks.uia.ac.be (Peter De Rijk)
  4. Subject: Problem with Phar Lap LITE
  5. Message-ID: <1993Jan21.171555.20186@reks.uia.ac.be>
  6. Organization: U.I.A.
  7. X-Newsreader: Tin 1.1 PL5
  8. Date: Thu, 21 Jan 1993 17:15:55 GMT
  9. Lines: 38
  10.  
  11.  
  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.  
  17. I can only allocate 13 blocks using farmalloc. Even when I do have enough
  18. memory left, the 14th farmalloc returns NULL. Is this a limitation of the
  19. LITE version only (it is not described as such.), or is something else wrong.
  20.  
  21. By freeing or reallocating using farmalloc, farrealloc and farfree memory can 
  22. get 'lost'. e.g. Suppose I want to gradually increase the amount of memory in
  23. an allocated block (as I said, just testing purposes). When I make a block 
  24. bigger by reallocating I can get about 1 megabyte. When make it bigger by 
  25. freeing it, and allocating the larger block, I only get to about halve a meg.
  26.  
  27. I see following possible solutions to the problem:
  28.  
  29. Since I am definately not a DOS guru, I am doing something terribly wrong with 
  30. the dos extender. If someone tells me what, I can correct this and get all 
  31. singing, all dancing memory allocation >640K.
  32.  
  33. I allocate one big block of memory in the beginning of the program, and do all
  34. memory management myself. I'm not really anxious to do this. To do it properly 
  35. it would require a rather big amount of work and time. So if someone else has
  36. already done this, and is willing to give it to me, ...
  37.  
  38. Someone else has had the same problem, and has found a solution I haven't even 
  39. thought about.
  40.  
  41. The problem is really driving me mad, and if someone has any idea how to solve 
  42. it, it would be enourmously appreciated.
  43.  
  44. Peter
  45.  
  46. PS. I've just read a post about someone using MSC 7.00 and a 'virtual memory
  47. manager'. Does this do what I want: use extended memory, allocate large blocks
  48. of memory under DOS. If so, maybe I should convert to MSC.
  49.