|
From: <sv...@va...> - 2006-02-24 09:53:21
|
Author: njn
Date: 2006-02-24 09:53:11 +0000 (Fri, 24 Feb 2006)
New Revision: 5696
Log:
Remove a bogus assertion, and make the shadow memory measurement 64-bit
clean.
Modified:
branches/COMPVBITS/coregrind/m_oset.c
branches/COMPVBITS/memcheck/mc_main.c
Modified: branches/COMPVBITS/coregrind/m_oset.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
--- branches/COMPVBITS/coregrind/m_oset.c 2006-02-23 23:26:57 UTC (rev 56=
95)
+++ branches/COMPVBITS/coregrind/m_oset.c 2006-02-24 09:53:11 UTC (rev 56=
96)
@@ -95,7 +95,7 @@
AvlNode* left;
AvlNode* right;
Char balance;
- Char padding[sizeof(void*)-3];
+ Char padding[sizeof(void*)-sizeof(Char)-sizeof(Short)];
Short magic;
};
=20
Modified: branches/COMPVBITS/memcheck/mc_main.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
--- branches/COMPVBITS/memcheck/mc_main.c 2006-02-23 23:26:57 UTC (rev 56=
95)
+++ branches/COMPVBITS/memcheck/mc_main.c 2006-02-24 09:53:11 UTC (rev 56=
96)
@@ -315,8 +315,6 @@
=20
static void update_SM_counts(SecMap* oldSM, SecMap* newSM)
{
- tl_assert(oldSM !=3D newSM);
- =20
if (oldSM =3D=3D &sm_distinguished[SM_DIST_NOACCESS]) n_noaccess=
_SMs--;
else if (oldSM =3D=3D &sm_distinguished[SM_DIST_WRITABLE]) n_writable=
_SMs--;
else if (oldSM =3D=3D &sm_distinguished[SM_DIST_READABLE]) n_readable=
_SMs--;
@@ -3988,10 +3986,11 @@
=20
// Three DSMs, plus the non-DSM ones
max_SMs_szB =3D (3 + max_non_DSM_SMs) * sizeof(SecMap);
- // The 12 bytes is the AVL node metadata size.
- // The 16 bytes is the malloc metadata size.
- // Hardwiring the numbers in sucks, but I don't see how else to do=
it.
- max_secVBit_szB =3D max_secVBit_nodes * (sizeof(SecVBitNode) + 12 =
+ 16);
+ // The 3*sizeof(Word) bytes is the AVL node metadata size.
+ // The 4*sizeof(Word) bytes is the malloc metadata size.
+ // Hardwiring these sizes in sucks, but I don't see how else to do=
it.
+ max_secVBit_szB =3D max_secVBit_nodes *=20
+ (sizeof(SecVBitNode) + 3*sizeof(Word) + 4*sizeof(Word));
max_shmem_szB =3D sizeof(primary_map) + max_SMs_szB + max_secVBi=
t_szB;
=20
VG_(message)(Vg_DebugMsg,
|