www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/30/23:52:20

From: j DOT aldrich6 AT genie DOT com
Message-Id: <199605010322.AA099050973@relay1.geis.com>
Date: Wed, 1 May 96 03:26:00 UTC 0000
To: djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Re: V2 vs. 1.12m5

Reply to message 8375604    from SOLYOM AT EIK DOT BM on 04/30/96  3:41PM


>Thanks for the advise, but this is not a very good alternative for me
> without completely rewriting the software, because now I use a hash
> table to get the address of an array of structures holding the
> individual words of the text file together with their file offsets, and I
> also use arrays for these offsets. So when a new word is to be
> added I reallocate my arrays to create a new array element for that
> word, and when the same word occures at another offset in the file I
> reallocate the offset array. And I think the allocation algorithm must
> come from the standard library, unless I have some special needs.

Well, in that case, I can't really help you.  My code does pretty much
cover all aspects of memory allocation you describe, *except* for
reallocation.  See below for suggestions...

>I think that there must be some differences between the compilers or
> the runtime libraries in ver 1.12 and V2 , because the program that
> blows up when compiled with one compiler runs without problem
> with the other

Nope, it's the DPMI that they use.  v1.12 uses GO32 for its DPMI services,
which is capable of running in real or v86 mode depending on the
need.  v2 *requires* a DPMI host, but it is capable of using any that is
currently installed, as well as CWSDPMI.

The problem is that while CWSDPMI has a limit on the number of simul-
taneously malloc'ed regions, Windoze, QEMM, Linux, etc. do not.  So you
should have no problems running your program under those environments.
Charles Sandmann is aware of the problem in CWSDPMI, but he hasn't
released any definitive word on whether it will be corrected any time soon.

If I were you, I'd try to work out a way to make your program use memory
more efficiently, but if you can't, you'll need to either revert to 1.12 or use
a commercial DPMI host like QEMM (not Windows unfortunately, because
of the 64MB limit).

John

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019