🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7638

Problem with Phar Lap LITE

#7638
From: Peter De Rijk
Date: Thu, 21 Jan 1993 17:15
38 lines
2221 bytes
I am trying to use memory >640K in C. I am trying out the 'LITE' version of 
DOS extender from Phar Lap. (I do not want to by the full version until I know
it will work with my program.) While doing some testing I encountered some 
ennoying problems:

I can only allocate 13 blocks using farmalloc. Even when I do have enough
memory left, the 14th farmalloc returns NULL. Is this a limitation of the
LITE version only (it is not described as such.), or is something else wrong.

By freeing or reallocating using farmalloc, farrealloc and farfree memory can 
get 'lost'. e.g. Suppose I want to gradually increase the amount of memory in
an allocated block (as I said, just testing purposes). When I make a block 
bigger by reallocating I can get about 1 megabyte. When make it bigger by 
freeing it, and allocating the larger block, I only get to about halve a meg.

I see following possible solutions to the problem:

Since I am definately not a DOS guru, I am doing something terribly wrong with 
the dos extender. If someone tells me what, I can correct this and get all 
singing, all dancing memory allocation >640K.

I allocate one big block of memory in the beginning of the program, and do all
memory management myself. I'm not really anxious to do this. To do it properly 
it would require a rather big amount of work and time. So if someone else has
already done this, and is willing to give it to me, ...

Someone else has had the same problem, and has found a solution I haven't even 
thought about.

The problem is really driving me mad, and if someone has any idea how to solve 
it, it would be enourmously appreciated.

Peter

PS. I've just read a post about someone using MSC 7.00 and a 'virtual memory
manager'. Does this do what I want: use extended memory, allocate large blocks
of memory under DOS. If so, maybe I should convert to MSC.
Technical Details
Message-ID: <1993Jan21.171555.20186@reks.uia.ac.be>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!ub4b!reks.uia.ac.be!derijkp

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!ub4b!reks.uia.ac.be!derijkp
From: derijkp@reks.uia.ac.be (Peter De Rijk)
Subject: Problem with Phar Lap LITE
Message-ID: <1993Jan21.171555.20186@reks.uia.ac.be>
Organization: U.I.A.
X-Newsreader: Tin 1.1 PL5
Date: Thu, 21 Jan 1993 17:15:55 GMT
Lines: 38