Replace the SegName array with a simple string table.
The validity of this change follows from the following observations:
(1) There is a single source for allocating and storing segment names,
(2) For all invocations of allocate_segname the returned value (which
represents the segmant name) is assigned to NSegment::fnIdx.
(3) All but one assignments to NSegment::fnIdx assign allocate_segname.
The single exception assigns -1 in init_nsegment. That function is
called whenever a new segment (named or unnamed) is allocated.
For a segment name to become unused there must be an assignment to
NSegment::fnIdx which was previously assigned a return value from
allocate_segname. There is no such assignment.
It follows that all segment names are in use at all times, hence
SegName::inUse == True for all SegNames. So we can constant fold it
and don't need to represent it.
Pass 3 in preen_nsegments is obsolete as there are no segment names to
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14898 a5019735-40e9-0310-863c-91ae7b9d1cf9
2 files changed