www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/16/02:40:56

Date: Sun, 16 Feb 1997 09:21:46 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Scott Frazer <frazer AT rtp DOT ericsson DOT se>
cc: djgpp AT delorie DOT com
Subject: Re: emacs 19.34 crashes immediately on win nt 4.0
In-Reply-To: <33049571.3003328@cnn.exu.ericsson.se>
Message-ID: <Pine.SUN.3.91.970216090855.14977D-100000@is>
MIME-Version: 1.0

On Fri, 14 Feb 1997, Scott Frazer wrote:

> To follow up on my own post here ... I commented out the 
> _go32_dpmi_free_dos_memory call from dosfns.c and w16selec.c
> ( the only two places in the 'src' and 'lib-src' directories
> it exists ), and lo and behold emacs works ( so far ).

Way cool!  I will look into that functions and see why might it fail on NT.

> I
> don't know how dangerous this is ... maybe some sort of subtle 
> memory leak that will eventually kill the process.

The call on dosfns.c can be easily rewritten to avoid calling that 
function (it can just use the transfer buffer).  It should have been 
written that way in the first place, but I didn't want to change existing 
code without a good reason, which I now have.

As for w16select.c, as long as you don't use `C-w' or `M-w' on regions
larger than 16KB (the size of the transfer buffer), the code doesn't
allocate and doesn't free DOS memory at all.  Once you kill or copy larger
regions, you will start losing DOS memory; without releasing it, after
some time you (1) won't be able to move data between Emacs and the Windows
clipboard; and (2) you won't be able to invoke subprocesses.  However,
since 16KB is quite a large size (and it can be enlarged by stubediting
Emacs), I don't expect you to hit this except under very special
circumstances.  And once I understand the reason for the problem, chances
are the code could be rewritten to work around the bug. 

Thanks again for pinpointing the locus of the crashes.

- Raw text -


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