|
From: <sv...@va...> - 2006-10-01 16:19:19
|
Author: sewardj
Date: 2006-10-01 17:19:17 +0100 (Sun, 01 Oct 2006)
New Revision: 6110
Log:
Track extra const-ness from VG_(am_find_nsegment).
Modified:
branches/AIX5/memcheck/mc_leakcheck.c
Modified: branches/AIX5/memcheck/mc_leakcheck.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/AIX5/memcheck/mc_leakcheck.c 2006-10-01 16:17:28 UTC (rev 61=
09)
+++ branches/AIX5/memcheck/mc_leakcheck.c 2006-10-01 16:19:17 UTC (rev 61=
10)
@@ -29,6 +29,7 @@
*/
=20
#include "pub_tool_basics.h"
+#include "pub_tool_vki.h"
#include "pub_tool_aspacemgr.h"
#include "pub_tool_execontext.h"
#include "pub_tool_hashtable.h"
@@ -858,14 +859,13 @@
categorisation, which [if the users ever manage to understand it]
is really useful for detecting lost cycles.
*/
- { NSegment* seg;
- Addr* seg_starts;
+ { Addr* seg_starts;
Int n_seg_starts;
seg_starts =3D get_seg_starts( &n_seg_starts );
tl_assert(seg_starts && n_seg_starts > 0);
/* VG_(am_show_nsegments)( 0,"leakcheck"); */
for (i =3D 0; i < n_seg_starts; i++) {
- seg =3D VG_(am_find_nsegment)( seg_starts[i] );
+ NSegment const* seg =3D VG_(am_find_nsegment)( seg_starts[i] );
tl_assert(seg);
if (seg->kind !=3D SkFileC && seg->kind !=3D SkAnonC)=20
continue;
@@ -879,7 +879,7 @@
memory by explicitly mapping /dev/zero. */
if (seg->kind =3D=3D SkFileC=20
&& (VKI_S_ISCHR(seg->mode) || VKI_S_ISBLK(seg->mode))) {
- HChar* dev_name =3D VG_(am_get_filename)( seg );
+ HChar* dev_name =3D VG_(am_get_filename)( (NSegment*)seg );
if (dev_name && 0 =3D=3D VG_(strcmp)(dev_name, "/dev/zero")) =
{
/* don't skip /dev/zero */
} else {
|