[Top][All Lists]

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

[PATCH] Possible problems when MCHECK is defined

From: Ognyan Kulev
Subject: [PATCH] Possible problems when MCHECK is defined
Date: Mon, 25 Mar 2002 20:23:34 +0200
User-agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.9) Gecko/20020311


In `libc/hurd/hurdmalloc.c:198' the value of NBUCKETS is defined as 29 and this is correct when LOG2_MIN_SIZE is 3. But when MCHECK is defined LOG2_MIN_SIZE becomes 4 and NBUCKETS must be 28.

Ognyan Kulev <ogi@fmi.uni-sofia.bg>, "\"Programmer\""
2002-03-25  Ognyan Kulev <ogi@fmi.uni-sofia.bg>

        * hurdmalloc.c: The value of NBUCKETS is now dependent on
--- hurdmalloc.c.patched-realloc        Mon Mar 25 19:47:19 2002
+++ hurdmalloc.c        Mon Mar 25 20:13:20 2002
@@ -195,7 +195,7 @@ typedef struct free_list {
  * HEADER_SIZE bytes available to user.  Size argument to malloc is a signed
  * integer for sanity checking, so largest block size is 2^31.
-#define NBUCKETS       29
+#define NBUCKETS       (31 - LOG2_MIN_SIZE + 1)
 static struct free_list malloc_free_list[NBUCKETS];

reply via email to

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