summaryrefslogtreecommitdiff
path: root/allchblk.c
diff options
context:
space:
mode:
authorhboehm <hboehm>2007-10-24 02:38:41 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:41 +0200
commit6bd946e18d7ec227ee1c295b3d0122758c07511e (patch)
tree60a6fc4e77b22a7a0405344f43252b1176bb8a92 /allchblk.c
parent68881a4d6f91e9876682da0c84345e6c6e01954a (diff)
2007-10-23 Hans Boehm <Hans.Boehm@hp.com>
* malloc.c: Update GC_large_allocd_bytes on explicit deallocation. * allchblk.c: Sanity check GC_max_large_allocd_bytes.
Diffstat (limited to 'allchblk.c')
-rw-r--r--allchblk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/allchblk.c b/allchblk.c
index 0cec29d..807a703 100644
--- a/allchblk.c
+++ b/allchblk.c
@@ -59,6 +59,8 @@ struct hblk * GC_hblkfreelist[N_HBLK_FLS+1] = { 0 };
static GC_bool GC_enough_large_bytes_left(word bytes, int n)
{
int i;
+
+ GC_ASSERT(GC_max_large_allocd_bytes <= GC_heapsize);
for (i = N_HBLK_FLS; i >= n; --i) {
bytes += GC_free_bytes[i];
if (bytes > GC_max_large_allocd_bytes) return TRUE;