/*global*/ UInt* VG_(tt_fastN)[VG_TT_FAST_SIZE];
+/* Make sure we're not used before initialisation. */
+static Bool init_done = False;
+
+
/*------------------ STATS DECLS ------------------*/
/* Number of fast-cache updates and flushes done. */
UChar* srcP;
UChar* dstP;
+ vg_assert(init_done);
vg_assert(vge->n_used >= 1 && vge->n_used <= 3);
vg_assert(code_len > 0 && code_len < 20000);
Bool upd_cache )
{
Int i, j, k, kstart, sno;
+
+ vg_assert(init_done);
/* Find the initial probe point just once. It will be the same in
all sectors and avoids multiple expensive % operations. */
n_full_lookups++;
Int sno, i;
Bool anyDeleted = False;
+ vg_assert(init_done);
+
for (sno = 0; sno < N_SECTORS; sno++) {
if (sectors[sno].tc == NULL)
continue;
{
Int i, avg_codeszQ;
+ vg_assert(!init_done);
+ init_done = True;
+
/* Otherwise lots of things go wrong... */
vg_assert(sizeof(ULong) == 8);
vg_assert(sizeof(Addr64) == 8);