Mail Archives: djgpp/1996/04/29/12:14:00
On Mon, 29 Apr 1996, Dr. Andras Solyom wrote:
> now and decided to use V2. After the modifications the third program, which cuts up the
> files to words and creates an index has died with a SIGSEV error in malloc. I know from
> this forum that CWSDPMI is the cause of this error, because I am allocating and
> reallocating a lot for the hash table. So I switched back to version 1.12maint5 and
> discovered that the new (modified) programs that were running without any error when I
> was using V2 now exit with segmentation fault except this third program which runs just
> fine with 1.12 and faults with V1.12.
The probability that you will get your problem solved is much higher if
you work in v2 (in fact, it's 100%). V1.x is unsupported, so if there is
any problem for which there is no known solution or workaround, you are
on your own.
Therefore I suggest the following approach:
1) Go back to v2 and verify that you still have the same crashes.
2) Run your programs under Windows. If the crashes persist and
happen at the same places, they have nothing to do with CWSDPMI. Try to
enlarge the stack of the program (see section 15.8 of the FAQ). If it
doesn't help, it might be a bug in the DJGPP library; you will have to
debug into malloc or any other function that bombs and post a detailed
description to get specific help (or maybe you will understand the problem
yourself).
3) If the crashes go away when you run your program under a DPMI
host other than CWSDPMI (e.g. Windows), it might indeed be a CWSDPMI
bug. If you can work under Windows until the next release of CWSDPMI
arrives, fine; if not, you can use a patch for CWSDPMI that enlarges its
internal heap size and makes possible to allocate more memory; or use the
UNIX_SBRK option in the startup flags that should solve the problems with
CWSDPMI.
And btw you should know that not every DPMI server will even allow you to
get as much as 150MB of virtual memory. CWSDPMI allows upto to 256MB,
but e.g. Win95 limits that to 64MB.
- Raw text -