bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

translate-region function on large files, causes emacs to crash due to l


From: trustno1
Subject: translate-region function on large files, causes emacs to crash due to lack of memory
Date: 2 Oct 2002 01:40:31 -0000

This bug report will be sent to the Free Software Foundation,
 not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

In GNU Emacs 20.7.1 (i386-redhat-linux-gnu)
 of Tue Jun 13 2000 on porky.devel.redhat.com
configured using `configure  --mandir=/usr/man --infodir=/usr/info 
--prefix=/usr --libexecdir=/usr/lib --sharedstatedir=/var --with-gcc --with-pop 
--with-x=no i386-redhat-linux-gnu'

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
I wrote a simple function to rot13 a buffer
it uses the translate-region function.

When this is used on a large buffer (600 kbyte novel)
emacs' memory usage jumps to about 30 megs and even
if the buffer is closed the memory is not freed.

If I run it on the bible(5 megs) emacs balloons to over 200
megs of memory usage and depending on the amount of
memory available on the system will actually kill
emacs. Again killing the buffer does not free the
memory.

I have tested this on emacs 21.2 on Debian/GNU linux 
(woody/stable), 20.7.1 redhat version 6.1 (cartman), 
21.2 windows 2000, and emacs 20.4.1 on solaris 2.7.
And all exhibit this problem.

Here is the actual lisp code I executed:

;First I define the translation table rot13-table
;I usually don't do it this way but I want to make sure
;that it is unambiguous
(setq rot13-table 
"      

 
!\"#$%&'()*+,-./0123456789:;<=>?@NOPQRSTUVWXYZABCDEFGHIJKLM[\\]^_`nopqrstuvwxyzabcdefghijklm")

;then i simply use translate-region on the current buffer
;using rot13-table above as the translation table
(defun rot13-buffer ()
"rot13 contents of current buffer"
(interactive)
(translate-region (point-min) (point-max) rot13-table))

I think that this might be a simple bug, but it seems
to be a built-in function written in c, and I wouldn't
know where to start.

I hope this bug report is helpful, please contact me at
bijan@psq.com or trustno1@crasseux.com if you have any
questions. Thanks for your time and consideration.

Keep up the good work,
Bijan Soleymani

Recent input:
[ B ESC [ A ESC [ A RET ESC [ 6 ~ ESC [ 6 ~ u ESC [ 
B ESC [ B ESC [ A RET ESC [ 6 ~ ESC [ 6 ~ u ESC [ B 
ESC [ D ESC [ D ESC [ D ESC [ D ESC [ D ESC [ D ESC 
[ D ESC [ D ESC [ D ESC [ D ESC [ D ESC [ D ESC [ D 
ESC [ D ESC [ C RET ESC [ 6 ~ ESC x r e p TAB o r TAB 
RET

Recent messages:
Loading info...done
Composing main Info directory...
Mark set
Composing main Info directory...done
Mark saved where search started
Making completion list...
Loading view...
Loading view...done
Loading emacsbug...
Loading emacsbug...done











reply via email to

[Prev in Thread] Current Thread [Next in Thread]