You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(31) |
2
(27) |
|
3
(25) |
4
(21) |
5
(21) |
6
(21) |
7
(32) |
8
(23) |
9
(15) |
|
10
(12) |
11
(9) |
12
(10) |
13
(10) |
14
(9) |
15
(7) |
16
(20) |
|
17
(14) |
18
(71) |
19
(67) |
20
(50) |
21
(25) |
22
(15) |
23
(37) |
|
24
(25) |
25
(41) |
26
(34) |
27
(57) |
28
(20) |
29
(30) |
30
(13) |
|
31
(18) |
|
|
|
|
|
|
|
From: <sv...@va...> - 2005-07-17 23:13:33
|
Author: njn
Date: 2005-07-18 00:12:33 +0100 (Mon, 18 Jul 2005)
New Revision: 4155
Log:
tweak
Modified:
trunk/coregrind/m_mallocfree.c
Modified: trunk/coregrind/m_mallocfree.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_mallocfree.c 2005-07-17 18:12:00 UTC (rev 4154)
+++ trunk/coregrind/m_mallocfree.c 2005-07-17 23:12:33 UTC (rev 4155)
@@ -551,15 +551,15 @@
UInt pszB_to_listNo ( SizeT pszB )
{
vg_assert(0 =3D=3D pszB % VG_MIN_MALLOC_SZB);
- pszB /=3D VG_MIN_MALLOC_SZB;
+ SizeT n =3D pszB / VG_MIN_MALLOC_SZB;
=20
// The first 13 lists hold blocks of size VG_MIN_MALLOC_SZB * list_nu=
m.
- // The final 4 hold bigger blocks.
- if (pszB <=3D 12) return pszB;
- if (pszB <=3D 16) return 13;
- if (pszB <=3D 32) return 14;
- if (pszB <=3D 64) return 15;
- if (pszB <=3D 128) return 16;
+ // The final 5 hold bigger blocks.
+ if (n <=3D 12) return (UInt)n;
+ if (n <=3D 16) return 13;
+ if (n <=3D 32) return 14;
+ if (n <=3D 64) return 15;
+ if (n <=3D 128) return 16;
return 17;
}
=20
|
|
From: <sv...@va...> - 2005-07-17 18:12:03
|
Author: njn
Date: 2005-07-17 19:12:00 +0100 (Sun, 17 Jul 2005)
New Revision: 4154
Log:
Introduced get_pszB() to cover several common cases.
Modified:
trunk/coregrind/m_mallocfree.c
Modified: trunk/coregrind/m_mallocfree.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_mallocfree.c 2005-07-17 18:00:57 UTC (rev 4153)
+++ trunk/coregrind/m_mallocfree.c 2005-07-17 18:12:00 UTC (rev 4154)
@@ -194,6 +194,45 @@
return &b2[mk_plain_bszB(get_bszB_lo(b)) - 1];
}
=20
+// Return the lower, upper and total overhead in bytes for a block.
+// These are determined purely by which arena the block lives in.
+static __inline__
+SizeT overhead_szB_lo ( Arena* a )
+{
+ return sizeof(SizeT) + sizeof(void*) + a->rz_szB;
+}
+static __inline__
+SizeT overhead_szB_hi ( Arena* a )
+{
+ return a->rz_szB + sizeof(void*) + sizeof(SizeT);
+}
+static __inline__
+SizeT overhead_szB ( Arena* a )
+{
+ return overhead_szB_lo(a) + overhead_szB_hi(a);
+}
+
+// Return the minimum bszB for a block in this arena. Can have zero-len=
gth
+// payloads, so it's the size of the admin bytes.
+static __inline__
+SizeT min_useful_bszB ( Arena* a )
+{
+ return overhead_szB(a);
+}
+
+// Convert payload size <--> block size (both in bytes).
+static __inline__
+SizeT pszB_to_bszB ( Arena* a, SizeT pszB )
+{
+ return pszB + overhead_szB(a);
+}
+static __inline__
+SizeT bszB_to_pszB ( Arena* a, SizeT bszB )
+{
+ vg_assert(bszB >=3D overhead_szB(a));
+ return bszB - overhead_szB(a);
+}
+
// Set and get the upper size field of a block.
static __inline__
void set_bszB_hi ( Block* b, SizeT bszB )
@@ -227,23 +266,12 @@
return mk_plain_bszB(get_bszB_as_is(b));
}
=20
-// Return the lower, upper and total overhead in bytes for a block.
-// These are determined purely by which arena the block lives in.
+// Get a block's payload size.
static __inline__
-SizeT overhead_szB_lo ( Arena* a )
+SizeT get_pszB ( Arena* a, Block* b )
{
- return sizeof(SizeT) + sizeof(void*) + a->rz_szB;
+ return bszB_to_pszB(a, get_bszB(b));
}
-static __inline__
-SizeT overhead_szB_hi ( Arena* a )
-{
- return a->rz_szB + sizeof(void*) + sizeof(SizeT);
-}
-static __inline__
-SizeT overhead_szB ( Arena* a )
-{
- return overhead_szB_lo(a) + overhead_szB_hi(a);
-}
=20
// Given the addr of a block, return the addr of its payload.
static __inline__
@@ -323,28 +351,6 @@
}
=20
=20
-// Return the minimum bszB for a block in this arena. Can have zero-len=
gth
-// payloads, so it's the size of the admin bytes.
-static __inline__
-SizeT min_useful_bszB ( Arena* a )
-{
- return overhead_szB(a);
-}
-
-// Convert payload size <--> block size (both in bytes).
-static __inline__
-SizeT pszB_to_bszB ( Arena* a, SizeT pszB )
-{
- return pszB + overhead_szB(a);
-}
-static __inline__
-SizeT bszB_to_pszB ( Arena* a, SizeT bszB )
-{
- vg_assert(bszB >=3D overhead_szB(a));
- return bszB - overhead_szB(a);
-}
-
-
/*------------------------------------------------------------*/
/*--- Arena management ---*/
/*------------------------------------------------------------*/
@@ -746,7 +752,7 @@
listno, b );
BOMB;
}
- b_pszB =3D bszB_to_pszB(a, get_bszB(b));
+ b_pszB =3D get_pszB(a, b);
if (b_pszB < list_min_pszB || b_pszB > list_max_pszB) {
VG_(printf)(=20
"sanity_check_malloc_arena: list %d at %p: "
@@ -1156,7 +1162,7 @@
vg_assert(frag_bszB >=3D min_useful_bszB(a));
=20
/* The actual payload size of the block we are going to split. */
- base_pszB_act =3D bszB_to_pszB(a, get_bszB(base_b));
+ base_pszB_act =3D get_pszB(a, base_b);
=20
/* Create the fragment block, and put it back on the relevant free li=
st. */
mkFreeBlock ( a, base_b, frag_bszB,
@@ -1170,12 +1176,9 @@
/* Final sanity checks. */
vg_assert( is_inuse_block(get_payload_block(a, align_p)) );
=20
- vg_assert(req_pszB
- <=3D=20
- bszB_to_pszB(a, get_bszB(get_payload_block(a, align_p)))
- );
+ vg_assert(req_pszB <=3D get_pszB(a, get_payload_block(a, align_p)));
=20
- a->bytes_on_loan +=3D bszB_to_pszB(a, get_bszB(get_payload_block(a, a=
lign_p)));
+ a->bytes_on_loan +=3D get_pszB(a, get_payload_block(a, align_p));
if (a->bytes_on_loan > a->bytes_on_loan_max)
a->bytes_on_loan_max =3D a->bytes_on_loan;
=20
@@ -1197,7 +1200,7 @@
{
Arena* a =3D arenaId_to_ArenaP(aid);
Block* b =3D get_payload_block(a, ptr);
- return bszB_to_pszB(a, get_bszB(b));
+ return get_pszB(a, b);
}
=20
=20
@@ -1230,7 +1233,7 @@
void* VG_(arena_realloc) ( ArenaId aid, void* ptr, SizeT req_pszB )
{
Arena* a;
- SizeT old_bszB, old_pszB;
+ SizeT old_pszB;
UChar *p_new;
Block* b;
=20
@@ -1245,8 +1248,7 @@
vg_assert(blockSane(a, b));
=20
vg_assert(is_inuse_block(b));
- old_bszB =3D get_bszB(b);
- old_pszB =3D bszB_to_pszB(a, old_bszB);
+ old_pszB =3D get_pszB(a, b);
=20
if (req_pszB <=3D old_pszB) {
VGP_POPCC(VgpMalloc);
|
|
From: <sv...@va...> - 2005-07-17 18:01:01
|
Author: njn
Date: 2005-07-17 19:00:57 +0100 (Sun, 17 Jul 2005)
New Revision: 4153
Log:
tweaks
Modified:
trunk/coregrind/m_mallocfree.c
Modified: trunk/coregrind/m_mallocfree.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_mallocfree.c 2005-07-17 17:55:42 UTC (rev 4152)
+++ trunk/coregrind/m_mallocfree.c 2005-07-17 18:00:57 UTC (rev 4153)
@@ -999,15 +999,15 @@
vg_assert(blockSane(a, b));
# endif
=20
- a->bytes_on_loan -=3D bszB_to_pszB(a, get_bszB(b));
-
+ b_bszB =3D get_bszB(b);
+ b_pszB =3D bszB_to_pszB(a, b_bszB);
sb =3D findSb( a, b );
sb_start =3D &sb->payload_bytes[0];
sb_end =3D &sb->payload_bytes[sb->n_payload_bytes - 1];
=20
+ a->bytes_on_loan -=3D b_pszB;
+
// Put this chunk back on a list somewhere.
- b_bszB =3D get_bszB(b);
- b_pszB =3D bszB_to_pszB(a, b_bszB);
b_listno =3D pszB_to_listNo(b_pszB);
mkFreeBlock( a, b, b_bszB, b_listno );
=20
@@ -1175,8 +1175,7 @@
bszB_to_pszB(a, get_bszB(get_payload_block(a, align_p)))
);
=20
- a->bytes_on_loan=20
- +=3D bszB_to_pszB(a, get_bszB(get_payload_block(a, align_p)));
+ a->bytes_on_loan +=3D bszB_to_pszB(a, get_bszB(get_payload_block(a, a=
lign_p)));
if (a->bytes_on_loan > a->bytes_on_loan_max)
a->bytes_on_loan_max =3D a->bytes_on_loan;
=20
|
|
From: <sv...@va...> - 2005-07-17 17:56:28
|
Author: njn
Date: 2005-07-17 18:55:42 +0100 (Sun, 17 Jul 2005)
New Revision: 4152
Log:
Introduce get_bszB() and get_bszB_as_is() to factor out some common
combinations of function calls.
Modified:
trunk/coregrind/m_mallocfree.c
Modified: trunk/coregrind/m_mallocfree.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_mallocfree.c 2005-07-17 17:20:30 UTC (rev 4151)
+++ trunk/coregrind/m_mallocfree.c 2005-07-17 17:55:42 UTC (rev 4152)
@@ -210,7 +210,23 @@
return *(SizeT*)&lb[-sizeof(SizeT) + 1];
}
=20
+// Get a block's size as stored, ie with the in-use/free attribute.
+static __inline__
+SizeT get_bszB_as_is ( Block* b )
+{
+ SizeT bszB_lo =3D get_bszB_lo(b);
+ SizeT bszB_hi =3D get_bszB_hi(b);
+ vg_assert(bszB_lo =3D=3D bszB_hi);
+ return bszB_lo;
+}
=20
+// Get a block's plain size, ie. remove the in-use/free attribute.
+static __inline__
+SizeT get_bszB ( Block* b )
+{
+ return mk_plain_bszB(get_bszB_as_is(b));
+}
+
// Return the lower, upper and total overhead in bytes for a block.
// These are determined purely by which arena the block lives in.
static __inline__
@@ -628,20 +644,18 @@
static=20
void ppSuperblocks ( Arena* a )
{
- UInt i, blockno;
+ UInt i, blockno =3D 1;
+ Superblock* sb =3D a->sblocks;
SizeT b_bszB;
- Block* b;
- Superblock* sb =3D a->sblocks;
- blockno =3D 1;
=20
while (sb) {
VG_(printf)( "\n" );
VG_(printf)( "superblock %d at %p, sb->n_pl_bs =3D %d, next =3D %p=
\n",=20
blockno++, sb, sb->n_payload_bytes, sb->next );
- for (i =3D 0; i < sb->n_payload_bytes; i +=3D mk_plain_bszB(b_bszB=
)) {
- b =3D (Block*)&sb->payload_bytes[i];
- b_bszB =3D get_bszB_lo(b);
- VG_(printf)( " block at %d, bszB %d: ", i, mk_plain_bszB(b_bs=
zB) );
+ for (i =3D 0; i < sb->n_payload_bytes; i +=3D b_bszB) {
+ Block* b =3D (Block*)&sb->payload_bytes[i];
+ b_bszB =3D get_bszB(b);
+ VG_(printf)( " block at %d, bszB %d: ", i, b_bszB );
VG_(printf)( "%s, ", is_inuse_block(b) ? "inuse" : "free");
VG_(printf)( "%s\n", blockSane(a, b) ? "ok" : "BAD" );
}
@@ -678,7 +692,7 @@
for (i =3D 0; i < sb->n_payload_bytes; i +=3D mk_plain_bszB(b_bszB=
)) {
blockctr_sb++;
b =3D (Block*)&sb->payload_bytes[i];
- b_bszB =3D get_bszB_lo(b);
+ b_bszB =3D get_bszB_as_is(b);
if (!blockSane(a, b)) {
VG_(printf)("sanity_check_malloc_arena: sb %p, block %d (bsz=
B %d): "
" BAD\n", sb, i, b_bszB );
@@ -732,7 +746,7 @@
listno, b );
BOMB;
}
- b_pszB =3D bszB_to_pszB(a, mk_plain_bszB(get_bszB_lo(b)));
+ b_pszB =3D bszB_to_pszB(a, get_bszB(b));
if (b_pszB < list_min_pszB || b_pszB > list_max_pszB) {
VG_(printf)(=20
"sanity_check_malloc_arena: list %d at %p: "
@@ -890,7 +904,7 @@
b =3D a->freelist[lno];
if (NULL =3D=3D b) continue; // If this list is empty, try the n=
ext one.
while (True) {
- b_bszB =3D mk_plain_bszB(get_bszB_lo(b));
+ b_bszB =3D get_bszB(b);
if (b_bszB >=3D req_bszB) goto obtained_block; // success!
b =3D get_next_b(b);
if (b =3D=3D a->freelist[lno]) break; // traversed entire fre=
elist
@@ -918,7 +932,7 @@
vg_assert(b !=3D NULL);
vg_assert(lno < N_MALLOC_LISTS);
vg_assert(a->freelist[lno] !=3D NULL);
- b_bszB =3D mk_plain_bszB(get_bszB_lo(b));
+ b_bszB =3D get_bszB(b);
// req_bszB is the size of the block we are after. b_bszB is the
// size of what we've actually got. */
vg_assert(b_bszB >=3D req_bszB);
@@ -933,7 +947,7 @@
mkInuseBlock(a, b, req_bszB);
mkFreeBlock(a, &b[req_bszB], frag_bszB,=20
pszB_to_listNo(bszB_to_pszB(a, frag_bszB)));
- b_bszB =3D mk_plain_bszB(get_bszB_lo(b));
+ b_bszB =3D get_bszB(b);
} else {
// No, mark as in use and use as-is.
unlinkBlock(a, b, lno);
@@ -985,14 +999,14 @@
vg_assert(blockSane(a, b));
# endif
=20
- a->bytes_on_loan -=3D bszB_to_pszB(a, mk_plain_bszB(get_bszB_lo(b)));
+ a->bytes_on_loan -=3D bszB_to_pszB(a, get_bszB(b));
=20
sb =3D findSb( a, b );
sb_start =3D &sb->payload_bytes[0];
sb_end =3D &sb->payload_bytes[sb->n_payload_bytes - 1];
=20
// Put this chunk back on a list somewhere.
- b_bszB =3D get_bszB_lo(b);
+ b_bszB =3D get_bszB(b);
b_pszB =3D bszB_to_pszB(a, b_bszB);
b_listno =3D pszB_to_listNo(b_pszB);
mkFreeBlock( a, b, b_bszB, b_listno );
@@ -1003,10 +1017,9 @@
other_b =3D b + b_bszB;
if (other_b+min_useful_bszB(a)-1 <=3D (Block*)sb_end) {
// Ok, we have a successor, merge if it's not in use.
- other_bszB =3D get_bszB_lo(other_b);
+ other_bszB =3D get_bszB(other_b);
if (!is_inuse_block(other_b)) {
// VG_(printf)( "merge-successor\n");
- other_bszB =3D mk_plain_bszB(other_bszB);
# ifdef DEBUG_MALLOC
vg_assert(blockSane(a, other_b));
# endif
@@ -1028,10 +1041,9 @@
if (b >=3D (Block*)sb_start + min_useful_bszB(a)) {
// Ok, we have a predecessor, merge if it's not in use.
other_b =3D get_predecessor_block( b );
- other_bszB =3D get_bszB_lo(other_b);
+ other_bszB =3D get_bszB(other_b);
if (!is_inuse_block(other_b)) {
// VG_(printf)( "merge-predecessor\n");
- other_bszB =3D mk_plain_bszB(other_bszB);
unlinkBlock( a, b, b_listno );
unlinkBlock( a, other_b, pszB_to_listNo(bszB_to_pszB(a, other_b=
szB)) );
b =3D other_b;
@@ -1144,7 +1156,7 @@
vg_assert(frag_bszB >=3D min_useful_bszB(a));
=20
/* The actual payload size of the block we are going to split. */
- base_pszB_act =3D bszB_to_pszB(a, mk_plain_bszB(get_bszB_lo(base_b)))=
;
+ base_pszB_act =3D bszB_to_pszB(a, get_bszB(base_b));
=20
/* Create the fragment block, and put it back on the relevant free li=
st. */
mkFreeBlock ( a, base_b, frag_bszB,
@@ -1160,13 +1172,11 @@
=20
vg_assert(req_pszB
<=3D=20
- bszB_to_pszB(a, mk_plain_bszB(get_bszB_lo(
- get_payload_block(a, align_=
p))))
+ bszB_to_pszB(a, get_bszB(get_payload_block(a, align_p)))
);
=20
a->bytes_on_loan=20
- +=3D bszB_to_pszB(a, mk_plain_bszB(get_bszB_lo(
- get_payload_block(a, align_p))=
));
+ +=3D bszB_to_pszB(a, get_bszB(get_payload_block(a, align_p)));
if (a->bytes_on_loan > a->bytes_on_loan_max)
a->bytes_on_loan_max =3D a->bytes_on_loan;
=20
@@ -1188,7 +1198,7 @@
{
Arena* a =3D arenaId_to_ArenaP(aid);
Block* b =3D get_payload_block(a, ptr);
- return bszB_to_pszB(a, get_bszB_lo(b));
+ return bszB_to_pszB(a, get_bszB(b));
}
=20
=20
@@ -1236,7 +1246,7 @@
vg_assert(blockSane(a, b));
=20
vg_assert(is_inuse_block(b));
- old_bszB =3D mk_plain_bszB(get_bszB_lo(b));
+ old_bszB =3D get_bszB(b);
old_pszB =3D bszB_to_pszB(a, old_bszB);
=20
if (req_pszB <=3D old_pszB) {
|
|
From: <sv...@va...> - 2005-07-17 17:20:33
|
Author: njn
Date: 2005-07-17 18:20:30 +0100 (Sun, 17 Jul 2005)
New Revision: 4151
Log:
Replace is_inuse_bszB() with is_inuse_block(), which is higher-level
and thus makes the code that uses it easier to understand.
Modified:
trunk/coregrind/m_mallocfree.c
Modified: trunk/coregrind/m_mallocfree.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_mallocfree.c 2005-07-17 17:12:24 UTC (rev 4150)
+++ trunk/coregrind/m_mallocfree.c 2005-07-17 17:20:30 UTC (rev 4151)
@@ -165,15 +165,6 @@
return bszB & (~SIZE_T_0x1);
}
=20
-// Does this bszB have the in-use attribute?
-static __inline__
-Bool is_inuse_bszB ( SizeT bszB )
-{
- vg_assert(bszB !=3D 0);
- return (0 !=3D (bszB & SIZE_T_0x1)) ? False : True;
-}
-
-
// Set and get the lower size field of a block.
static __inline__
void set_bszB_lo ( Block* b, SizeT bszB )
@@ -186,6 +177,15 @@
return *(SizeT*)&b[0];
}
=20
+// Does this block have the in-use attribute?
+static __inline__
+Bool is_inuse_block ( Block* b )
+{
+ SizeT bszB =3D get_bszB_lo(b);
+ vg_assert(bszB !=3D 0);
+ return (0 !=3D (bszB & SIZE_T_0x1)) ? False : True;
+}
+
// Get the address of the last byte in a block
static __inline__
UByte* last_byte ( Block* b )
@@ -610,7 +610,7 @@
UInt i;
if (get_bszB_lo(b) !=3D get_bszB_hi(b))
{BLEAT("sizes");return False;}
- if (!a->clientmem && is_inuse_bszB(get_bszB_lo(b))) {
+ if (!a->clientmem && is_inuse_block(b)) {
for (i =3D 0; i < a->rz_szB; i++) {
if (get_rz_lo_byte(a, b, i) !=3D=20
(UByte)(((Addr)b&0xff) ^ REDZONE_LO_MASK))
@@ -642,7 +642,7 @@
b =3D (Block*)&sb->payload_bytes[i];
b_bszB =3D get_bszB_lo(b);
VG_(printf)( " block at %d, bszB %d: ", i, mk_plain_bszB(b_bs=
zB) );
- VG_(printf)( "%s, ", is_inuse_bszB(b_bszB) ? "inuse" : "free");
+ VG_(printf)( "%s, ", is_inuse_block(b) ? "inuse" : "free");
VG_(printf)( "%s\n", blockSane(a, b) ? "ok" : "BAD" );
}
vg_assert(i =3D=3D sb->n_payload_bytes); // no overshoot at end =
of Sb
@@ -684,7 +684,7 @@
" BAD\n", sb, i, b_bszB );
BOMB;
}
- thisFree =3D !is_inuse_bszB(b_bszB);
+ thisFree =3D !is_inuse_block(b);
if (thisFree && lastWasFree) {
VG_(printf)("sanity_check_malloc_arena: sb %p, block %d (bsz=
B %d): "
"UNMERGED FREES\n",
@@ -1004,7 +1004,7 @@
if (other_b+min_useful_bszB(a)-1 <=3D (Block*)sb_end) {
// Ok, we have a successor, merge if it's not in use.
other_bszB =3D get_bszB_lo(other_b);
- if (!is_inuse_bszB(other_bszB)) {
+ if (!is_inuse_block(other_b)) {
// VG_(printf)( "merge-successor\n");
other_bszB =3D mk_plain_bszB(other_bszB);
# ifdef DEBUG_MALLOC
@@ -1029,7 +1029,7 @@
// Ok, we have a predecessor, merge if it's not in use.
other_b =3D get_predecessor_block( b );
other_bszB =3D get_bszB_lo(other_b);
- if (!is_inuse_bszB(other_bszB)) {
+ if (!is_inuse_block(other_b)) {
// VG_(printf)( "merge-predecessor\n");
other_bszB =3D mk_plain_bszB(other_bszB);
unlinkBlock( a, b, b_listno );
@@ -1156,7 +1156,7 @@
+ overhead_szB_hi(a) - (UByte*)align_b );
=20
/* Final sanity checks. */
- vg_assert( is_inuse_bszB(get_bszB_lo(get_payload_block(a, align_p))) =
);
+ vg_assert( is_inuse_block(get_payload_block(a, align_p)) );
=20
vg_assert(req_pszB
<=3D=20
@@ -1235,9 +1235,8 @@
b =3D get_payload_block(a, ptr);
vg_assert(blockSane(a, b));
=20
- old_bszB =3D get_bszB_lo(b);
- vg_assert(is_inuse_bszB(old_bszB));
- old_bszB =3D mk_plain_bszB(old_bszB);
+ vg_assert(is_inuse_block(b));
+ old_bszB =3D mk_plain_bszB(get_bszB_lo(b));
old_pszB =3D bszB_to_pszB(a, old_bszB);
=20
if (req_pszB <=3D old_pszB) {
|
|
From: <sv...@va...> - 2005-07-17 17:12:27
|
Author: njn
Date: 2005-07-17 18:12:24 +0100 (Sun, 17 Jul 2005)
New Revision: 4150
Log:
Rename 'other' as 'other_b' to make the fact it's a block more clear.
Modified:
trunk/coregrind/m_mallocfree.c
Modified: trunk/coregrind/m_mallocfree.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_mallocfree.c 2005-07-17 16:16:41 UTC (rev 4149)
+++ trunk/coregrind/m_mallocfree.c 2005-07-17 17:12:24 UTC (rev 4150)
@@ -963,7 +963,7 @@
Superblock* sb;
UByte* sb_start;
UByte* sb_end;
- Block* other;
+ Block* other_b;
Block* b;
SizeT b_bszB, b_pszB, other_bszB;
UInt b_listno;
@@ -1000,18 +1000,18 @@
// See if this block can be merged with its successor.
// First test if we're far enough before the superblock's end to poss=
ibly
// have a successor.
- other =3D b + b_bszB;
- if (other+min_useful_bszB(a)-1 <=3D (Block*)sb_end) {
+ other_b =3D b + b_bszB;
+ if (other_b+min_useful_bszB(a)-1 <=3D (Block*)sb_end) {
// Ok, we have a successor, merge if it's not in use.
- other_bszB =3D get_bszB_lo(other);
+ other_bszB =3D get_bszB_lo(other_b);
if (!is_inuse_bszB(other_bszB)) {
// VG_(printf)( "merge-successor\n");
other_bszB =3D mk_plain_bszB(other_bszB);
# ifdef DEBUG_MALLOC
- vg_assert(blockSane(a, other));
+ vg_assert(blockSane(a, other_b));
# endif
unlinkBlock( a, b, b_listno );
- unlinkBlock( a, other, pszB_to_listNo(bszB_to_pszB(a,other_bszB=
)) );
+ unlinkBlock( a, other_b, pszB_to_listNo(bszB_to_pszB(a,other_bs=
zB)) );
b_bszB +=3D other_bszB;
b_listno =3D pszB_to_listNo(bszB_to_pszB(a, b_bszB));
mkFreeBlock( a, b, b_bszB, b_listno );
@@ -1019,7 +1019,7 @@
} else {
// Not enough space for successor: check that b is the last block
// ie. there are no unused bytes at the end of the Superblock.
- vg_assert(other-1 =3D=3D (Block*)sb_end);
+ vg_assert(other_b-1 =3D=3D (Block*)sb_end);
}
=20
// Then see if this block can be merged with its predecessor.
@@ -1027,14 +1027,14 @@
// have a predecessor.
if (b >=3D (Block*)sb_start + min_useful_bszB(a)) {
// Ok, we have a predecessor, merge if it's not in use.
- other =3D get_predecessor_block( b );
- other_bszB =3D get_bszB_lo(other);
+ other_b =3D get_predecessor_block( b );
+ other_bszB =3D get_bszB_lo(other_b);
if (!is_inuse_bszB(other_bszB)) {
// VG_(printf)( "merge-predecessor\n");
other_bszB =3D mk_plain_bszB(other_bszB);
unlinkBlock( a, b, b_listno );
- unlinkBlock( a, other, pszB_to_listNo(bszB_to_pszB(a, other_bsz=
B)) );
- b =3D other;
+ unlinkBlock( a, other_b, pszB_to_listNo(bszB_to_pszB(a, other_b=
szB)) );
+ b =3D other_b;
b_bszB +=3D other_bszB;
b_listno =3D pszB_to_listNo(bszB_to_pszB(a, b_bszB));
mkFreeBlock( a, b, b_bszB, b_listno );
|
|
From: <sv...@va...> - 2005-07-17 16:16:46
|
Author: njn
Date: 2005-07-17 17:16:41 +0100 (Sun, 17 Jul 2005)
New Revision: 4149
Log:
Make VG_(percentify)() cope if the denominator is zero.
Modified:
trunk/coregrind/m_libcprint.c
Modified: trunk/coregrind/m_libcprint.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_libcprint.c 2005-07-17 16:12:59 UTC (rev 4148)
+++ trunk/coregrind/m_libcprint.c 2005-07-17 16:16:41 UTC (rev 4149)
@@ -158,8 +158,14 @@
void VG_(percentify)(UInt n, UInt m, UInt d, Int n_buf, char buf[])=20
{
Int i, len, space;
+ ULong p1;
=20
- ULong p1 =3D (100*n) / m;
+ if (m =3D=3D 0) {
+ VG_(sprintf)(buf, "--%%");
+ return;
+ }
+ =20
+ p1 =3D (100*n) / m;
=20
if (d =3D=3D 0) {
VG_(sprintf)(buf, "%lld%%", p1);
|
|
From: <sv...@va...> - 2005-07-17 16:13:32
|
Author: njn
Date: 2005-07-17 17:12:59 +0100 (Sun, 17 Jul 2005)
New Revision: 4148
Log:
Fix comments.
Modified:
trunk/coregrind/m_libcprint.c
trunk/include/pub_tool_libcprint.h
Modified: trunk/coregrind/m_libcprint.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_libcprint.c 2005-07-13 14:18:24 UTC (rev 4147)
+++ trunk/coregrind/m_libcprint.c 2005-07-17 16:12:59 UTC (rev 4148)
@@ -154,7 +154,7 @@
percentify()
------------------------------------------------------------------ */
=20
-// Percentify n/m with p decimal places. Includes the '%' symbol at the=
end.
+// Percentify n/m with d decimal places. Includes the '%' symbol at the=
end.
void VG_(percentify)(UInt n, UInt m, UInt d, Int n_buf, char buf[])=20
{
Int i, len, space;
Modified: trunk/include/pub_tool_libcprint.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/pub_tool_libcprint.h 2005-07-13 14:18:24 UTC (rev 4147)
+++ trunk/include/pub_tool_libcprint.h 2005-07-17 16:12:59 UTC (rev 4148)
@@ -45,7 +45,7 @@
extern UInt VG_(sprintf) ( Char* buf, const HChar* format, ... );
extern UInt VG_(vsprintf)( Char* buf, const HChar* format, va_list vargs=
);
=20
-// Percentify n/m with p decimal places. Includes the '%' symbol at the=
end.
+// Percentify n/m with d decimal places. Includes the '%' symbol at the=
end.
extern void VG_(percentify)(UInt n, UInt m, UInt d, Int n_buf, char buf[=
]);
=20
/* ---------------------------------------------------------------------
|
|
From: <js...@ac...> - 2005-07-17 02:40:00
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-07-17 03:30:00 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 179 tests, 2 stderr failures, 0 stdout failures ================= none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <to...@co...> - 2005-07-17 02:35:54
|
Nightly build on dunsmere ( athlon, Fedora Core 4 ) started at 2005-07-17 03:30:04 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 181 tests, 5 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-07-17 02:21:08
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-07-17 03:15:03 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 180 tests, 14 stderr failures, 0 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-07-17 02:15:03
|
Nightly build on dellow ( x86_64, Fedora Core 4 ) started at 2005-07-17 03:10:07 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 159 tests, 7 stderr failures, 0 stdout failures ================= memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) |
|
From: Tom H. <th...@cy...> - 2005-07-17 02:11:37
|
Nightly build on aston ( x86_64, Fedora Core 3 ) started at 2005-07-17 03:05:07 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 159 tests, 7 stderr failures, 0 stdout failures ================= memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) |
|
From: Tom H. <th...@cy...> - 2005-07-17 02:04:25
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-07-17 03:00:03 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 159 tests, 8 stderr failures, 0 stdout failures ================= memcheck/tests/sigaltstack (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) |