mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 21:40:33 +02:00
* gc.c (scm_gc_sweep): Print an error message when aborting due to
underflowing scm_mallocated.
This commit is contained in:
parent
b30366b6b9
commit
c709de7f98
2 changed files with 18 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
|
||||||
|
|
||||||
|
* gc.c (scm_gc_sweep): Print an error message when aborting due to
|
||||||
|
underflowing scm_mallocated.
|
||||||
|
|
||||||
2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
|
2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
|
||||||
|
|
||||||
* gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
|
* gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1833,12 +1833,18 @@ scm_gc_sweep ()
|
||||||
scm_gc_yield -= scm_cells_allocated;
|
scm_gc_yield -= scm_cells_allocated;
|
||||||
|
|
||||||
if (scm_mallocated < m)
|
if (scm_mallocated < m)
|
||||||
/* The byte count of allocated objects has underflowed. This is
|
{
|
||||||
probably because you forgot to report the sizes of objects you
|
/* The byte count of allocated objects has underflowed. This is
|
||||||
have allocated, by calling scm_done_malloc or some such. When
|
probably because you forgot to report the sizes of objects you
|
||||||
the GC freed them, it subtracted their size from
|
have allocated, by calling scm_done_malloc or some such. When
|
||||||
scm_mallocated, which underflowed. */
|
the GC freed them, it subtracted their size from
|
||||||
abort ();
|
scm_mallocated, which underflowed. */
|
||||||
|
fprintf (stderr,
|
||||||
|
"scm_gc_sweep: Byte count of allocated objects has underflowed.\n"
|
||||||
|
"This is probably because the GC hasn't been correctly informed\n"
|
||||||
|
"about object sizes\n");
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
|
||||||
scm_mallocated -= m;
|
scm_mallocated -= m;
|
||||||
scm_gc_malloc_collected = m;
|
scm_gc_malloc_collected = m;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue