static void show_nsegment_full ( Int logLevel, Int segNo, const NSegment* seg )
{
HChar len_buf[20];
- const HChar* name = VG_(am_get_segname)( seg->fnIdx );
+ const HChar* name = ML_(am_get_segname)( seg->fnIdx );
if (name == NULL)
name = "(none)";
seg->isCH ? 'H' : '-',
show_ShrinkMode(seg->smode),
seg->dev, seg->ino, seg->offset,
- VG_(am_segname_get_seqnr)(seg->fnIdx), seg->fnIdx,
+ ML_(am_segname_get_seqnr)(seg->fnIdx), seg->fnIdx,
name
);
}
seg->hasX ? 'x' : '-', seg->hasT ? 'T' : '-',
seg->isCH ? 'H' : '-',
seg->dev, seg->ino, seg->offset,
- VG_(am_segname_get_seqnr)(seg->fnIdx), seg->fnIdx
+ ML_(am_segname_get_seqnr)(seg->fnIdx), seg->fnIdx
);
break;
VG_(debugLog)(logLevel, "aspacem",
"<<< SHOW_SEGMENTS: %s (%d segments)\n",
who, nsegments_used);
- VG_(am_show_segnames)( logLevel, who);
+ ML_(am_show_segnames)( logLevel, who);
for (i = 0; i < nsegments_used; i++)
show_nsegment( logLevel, i, &nsegments[i] );
VG_(debugLog)(logLevel, "aspacem",
const HChar* VG_(am_get_filename)( NSegment const * seg )
{
aspacem_assert(seg);
- return VG_(am_get_segname)( seg->fnIdx );
+ return ML_(am_get_segname)( seg->fnIdx );
}
/* Collect up the start addresses of segments whose kind matches one of
case SkFileC: case SkFileV:
return
s->smode == SmFixed
- && VG_(am_sane_segname)(s->fnIdx)
+ && ML_(am_sane_segname)(s->fnIdx)
&& !s->isCH;
case SkResvn:
+ ((ULong)s2->start) - ((ULong)s1->start) ) {
s1->end = s2->end;
s1->hasT |= s2->hasT;
- VG_(am_dec_refcount)(s1->fnIdx);
+ ML_(am_dec_refcount)(s1->fnIdx);
return True;
}
break;
nsegments[i+1].offset
+= ((ULong)nsegments[i+1].start) - ((ULong)nsegments[i].start);
- VG_(am_inc_refcount)(nsegments[i].fnIdx);
+ ML_(am_inc_refcount)(nsegments[i].fnIdx);
aspacem_assert(sane_NSegment(&nsegments[i]));
aspacem_assert(sane_NSegment(&nsegments[i+1]));
that decrement the reference counters for the segments names of
the replaced segments. */
for (i = iLo; i <= iHi; ++i)
- VG_(am_dec_refcount)(nsegments[i].fnIdx);
+ ML_(am_dec_refcount)(nsegments[i].fnIdx);
delta = iHi - iLo;
aspacem_assert(delta >= 0);
if (delta > 0) {
# endif // defined(VGP_arm_linux)
if (filename)
- seg.fnIdx = VG_(am_allocate_segname)( filename );
+ seg.fnIdx = ML_(am_allocate_segname)( filename );
if (0) show_nsegment( 2,0, &seg );
add_segment( &seg );
aspacem_assert(sizeof(SSizeT) == sizeof(void*));
/* Initialise the string table for segment names. */
- VG_(am_segnames_init)();
+ ML_(am_segnames_init)();
/* Check that we can store the largest imaginable dev, ino and
offset numbers in an NSegment. */
seg.mode = mode;
}
if (ML_(am_resolve_filename)(fd, buf, VKI_PATH_MAX)) {
- seg.fnIdx = VG_(am_allocate_segname)( buf );
+ seg.fnIdx = ML_(am_allocate_segname)( buf );
}
}
add_segment( &seg );
seg.mode = mode;
}
if (name) {
- seg.fnIdx = VG_(am_allocate_segname)( name );
+ seg.fnIdx = ML_(am_allocate_segname)( name );
} else if (ML_(am_resolve_filename)(fd, buf, VKI_PATH_MAX)) {
- seg.fnIdx = VG_(am_allocate_segname)( buf );
+ seg.fnIdx = ML_(am_allocate_segname)( buf );
}
add_segment( &seg );
seg.mode = mode;
}
if (ML_(am_resolve_filename)(fd, buf, VKI_PATH_MAX)) {
- seg.fnIdx = VG_(am_allocate_segname)( buf );
+ seg.fnIdx = ML_(am_allocate_segname)( buf );
}
add_segment( &seg );
If none is found, an index is allocated and the name stored.
If running ouf of memory, return -1. */
Int
-VG_(am_allocate_segname)(const HChar *name)
+ML_(am_allocate_segname)(const HChar *name)
{
UInt len, ix, size, next_freeslot;
/* Debugging output */
void
-VG_(am_show_segnames)(Int logLevel, const HChar *prefix)
+ML_(am_show_segnames)(Int logLevel, const HChar *prefix)
{
UInt size, ix, i;
Used in aspacemgr debug output to associate a segment with
a segment name. */
Int
-VG_(am_segname_get_seqnr)(Int fnIdx)
+ML_(am_segname_get_seqnr)(Int fnIdx)
{
SizeT ix, size;
Int seqnr = -1;
/* Initialise the string table for segment names. It contains an empty
string which is not referenced. */
void
-VG_(am_segnames_init)(void)
+ML_(am_segnames_init)(void)
{
aspacem_assert(sizeof segnames >= overhead);
/* Increase reference count of segment name identified by IX. */
void
-VG_(am_inc_refcount)(Int ix)
+ML_(am_inc_refcount)(Int ix)
{
if (ix != -1)
inc_refcount(ix);
/* Decrease reference count of segment name identified by IX. */
void
-VG_(am_dec_refcount)(Int ix)
+ML_(am_dec_refcount)(Int ix)
{
if (ix != -1)
dec_refcount(ix);
}
Bool
-VG_(am_sane_segname)(Int ix)
+ML_(am_sane_segname)(Int ix)
{
return ix == -1 || (ix >= overhead && ix < segnames_used);
}
const HChar *
-VG_(am_get_segname)(Int ix)
+ML_(am_get_segname)(Int ix)
{
return (ix == -1) ? NULL : segnames + ix;
}
/* ------ Implemented in aspacemgr-segnames.c ------ */
-void VG_(am_segnames_init)(void);
-void VG_(am_show_segnames)(Int logLevel, const HChar *prefix);
+void ML_(am_segnames_init)(void);
+void ML_(am_show_segnames)(Int logLevel, const HChar *prefix);
/* Put NAME into the string table of segment names. Return index for
future reference. A return value of -1 indicates that the segment name
could not be stored. Basically an out-of-memory situation. */
-Int VG_(am_allocate_segname)(const HChar *name);
+Int ML_(am_allocate_segname)(const HChar *name);
/* Increment / decrement the reference counter for this segment name. */
-void VG_(am_inc_refcount)(Int);
-void VG_(am_dec_refcount)(Int);
+void ML_(am_inc_refcount)(Int);
+void ML_(am_dec_refcount)(Int);
/* Check whether the segname index is sane. */
-Bool VG_(am_sane_segname)(Int fnIdx);
+Bool ML_(am_sane_segname)(Int fnIdx);
/* Return the segment name for the given index. Maybe return NULL, if the
segment does not have a name. */
-const HChar *VG_(am_get_segname)(Int fnIdx);
+const HChar *ML_(am_get_segname)(Int fnIdx);
/* Return the sequence number of the segment name */
-Int VG_(am_segname_get_seqnr)(Int fnIdx);
+Int ML_(am_segname_get_seqnr)(Int fnIdx);
#endif // __PRIV_ASPACEMGR_H