1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 06:41:13 +02:00

(scm_gc_register_collectable_memory): more overflow

protection.
This commit is contained in:
Han-Wen Nienhuys 2002-09-09 14:09:35 +00:00
parent 1e71eafb34
commit e88e4f2ef3
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
* gc-malloc.c (scm_gc_register_collectable_memory): more overflow
protection.
2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
* inline.h: include stdio.h

View file

@ -234,9 +234,9 @@ scm_gc_register_collectable_memory (void *mem, size_t size, const char *what)
Instead of getting bogged down, we let the mtrigger grow
strongly with it.
*/
float no_overflow_trigger = (float)(scm_mallocated * 110);
float no_overflow_trigger = scm_mallocated * 110.0;
no_overflow_trigger /= (float) (100 - scm_i_minyield_malloc);
no_overflow_trigger /= (float) (100.0 - scm_i_minyield_malloc);
scm_mtrigger = (unsigned long) no_overflow_trigger;
#ifdef DEBUGINFO