|
From: <sv...@va...> - 2014-04-26 22:50:16
|
Author: philippe
Date: Sat Apr 26 22:50:08 2014
New Revision: 13915
Log:
clo_processing is now done when this procedure is called.
So, we can now allocate this memory only when approx history level
is requested.
I double checked using printf that clo processing was done before
this procedure is called.
Modified:
trunk/helgrind/libhb_core.c
Modified: trunk/helgrind/libhb_core.c
==============================================================================
--- trunk/helgrind/libhb_core.c (original)
+++ trunk/helgrind/libhb_core.c Sat Apr 26 22:50:08 2014
@@ -3668,14 +3668,11 @@
thr->llexit_done = False;
thr->joinedwith_done = False;
thr->filter = HG_(zalloc)( "libhb.Thr__new.2", sizeof(Filter) );
- /* We only really need this at history level 1, but unfortunately
- this routine is called before the command line processing is
- done (sigh), so we can't rely on HG_(clo_history_level) at this
- point. Hence always allocate it. Bah. */
- thr->local_Kws_n_stacks
- = VG_(newXA)( HG_(zalloc),
- "libhb.Thr__new.3 (local_Kws_and_stacks)",
- HG_(free), sizeof(ULong_n_EC) );
+ if (HG_(clo_history_level) == 1)
+ thr->local_Kws_n_stacks
+ = VG_(newXA)( HG_(zalloc),
+ "libhb.Thr__new.3 (local_Kws_and_stacks)",
+ HG_(free), sizeof(ULong_n_EC) );
/* Add this Thr* <-> ThrID binding to the mapping, and
cross-check */
|