www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/02/23/03:36:34

Date: Wed, 23 Feb 94 17:17:11 JST
From: Stephen Turnbull <turnbull AT shako DOT sk DOT tsukuba DOT ac DOT jp>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: memory woes

Hi all!
    I'm testing a recent version of Ghostscript for DESQview/X
compiled with DJGPP (GO32 1.11.maint3 and GCC 2.5.7), and on a large
color .PS file, it crashes DV/X with a message "abnormal termination,
no more memory."
    GS gets all its memory from malloc() (allegedly).  My
understanding was that malloc gets its memory from GO32, which gets it
from the system as follows:
    (1) if there is a DPMI manager, get it from DPMI
    (2) if not and there is a VCPI manager, get it from VCPI
    (3) if not and there is an EMS manager, get EMS memory
    (4) if not and there is an XMS manager, get XMS memory
    (5) if not and there is available extended memory, get that
    (6) if not and there is available disk, use virtual memory
I don't have QDPMI loaded, and QEMM386 is a VCPI server.  So memory
requests should be serviced by (2), and on failure (6).  Since I have
about 65MB free on disk, there shouldn't be a problem with space
available to GO32....
    Now, none of the tools I have (mem, quarterdeck manifest, DVX
system monitor) can find any EMS handles except for the one originally
allocated by DVX for the GS process.  DVX also can limit the amount of
EMS/XMS available to any given process.  So it looks like malloc()
(and GO32?) is somehow bypassing the standard memory aloocation
process.  Isn't VCPI (in part) a souped-up EMS, so an EMS handle
should show up?  (Yes, these tools can detect those handles across
windows, they're global.)
    I have protection turned on in this window, so it seems unlikely
that a berserker pointer is munging DVX's system space (this
protection is so robust that it complains about Quarterdeck's own DPMI
server's attempt to detect a monochrome card).
    Any suggestions would be gratefully accepted....  What I'll try if
I have time is to attempt to track all of GS's memory requests, and
see if they add up to over 12MB (the amount of RAM free according to
DVX when I start the GS process).  Is it really dangerous to try to
implement that in malloc?
    --Steve

+-----------------------------------------------------------------------+
|                           Stephen Turnbull                            |
|     University of Tsukuba, Institute of Socio-Economic Planning       |
|          Tennodai 1-chome 1--1, Tsukuba, Ibaraki 305 JAPAN            |
|        Phone:  +81 (298) 53-5091     Fax:  +81 (298) 55-3849          |
|               Email:  turnbull AT shako DOT sk DOT tsukuba DOT ac DOT jp                 |
|                                                                       |
|                Founder and CEO, Skinny Boy Associates                 |
|               Mechanism Design and Social Engineering                 |
| REAL solutions to REAL problems of REAL people in REAL time!  REALLY. |
|                      Phone:  +81 (298) 56-2703                        |
+-----------------------------------------------------------------------+

- Raw text -


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