[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
check_memory_limits can be useless
From: |
Nozomu Ando |
Subject: |
check_memory_limits can be useless |
Date: |
Sat, 11 Mar 2006 02:13:37 +0900 |
check_memory_limits() does not do the job,
if !HAVE_GETRLIMIT && !WINDOWSNT
and if there is difference between the GNU Emacs builder's datasize
limit and user's one.
Symptom on my NetBSD/i386:
% cd /path/to/emacs.cvs
% limit data 16m # set datasize limit 16 mega bytes
% rm src/emacs ; make
% unlimit data # set datasize limit 3072 mega bytes
% ./src/emacs
:
(do some ten megabyte consuming job on the emacs)
then I got a warning:
Emergency (alloc): Warning: past 85% of memory limit
while I have some hundred mega bytes free memory.
An analysis:
On some platform, check_memory_limits() calls get_lim_data() only once
(vm-limit.c:81) before unexec, so lim_data of vm-limit.c is initialized
by GNU Emacs builder's datasize limit value, not Emacs user's one.
Fix here:
"Force data limit to be recalculated on each run." on other than
WINDOWSNT (patch attached).
---
Nozomu Ando
---
*** vm-limit.c 11 Mar 2006 01:39:14 +0900 1.17
--- vm-limit.c 11 Mar 2006 01:59:51 +0900
***************
*** 160,169 ****
warn_function = warnfun;
__after_morecore_hook = check_memory_limits;
- #ifdef WINDOWSNT
/* Force data limit to be recalculated on each run. */
lim_data = 0;
- #endif
}
/* arch-tag: eab04eda-1f69-447a-8d9f-95f0a3983ca5
--- 160,167 ----
- check_memory_limits can be useless,
Nozomu Ando <=