chapel-lang/chapel — pull request #613 by sungeunchoi (2014-10-03 23:11:30+00:00)
Title: Update printFinalMemStat.no-local.good

[with help from Greg]

The no-local output of this test changed with commit
e0686dd49db.. (Remove remote string copy); the total amount of memory
allocated and freed went up (no additional memory leaked).

The commit changed the global Chapel strings (s_memLog and
sMemLeaksLog) in the MemTracking module to type string_rec, and so the
string_rec variables are now being cleaned up by
chpl__autoDestroyGlobals() in the generated code. In the --no-local
case, the on statement in the string_rec destructor requires heap
allocated bundled args (even though we're already on the right
locale), which account for the extra allocations and frees. Greg
notes we really should be checking earlier whether or not we need the
bundled args, but that task is for another day.