[Webkit-unassigned] [Bug 94712] High memory usage spike in AssemblerBuffer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 23 14:54:00 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=94712





--- Comment #9 from Benjamin Poulain <benjamin at webkit.org>  2012-08-23 14:53:58 PST ---
> Not ready for review yet. But thanks for reviewing.

Yep, I noticed there was no r? only after making a few comments :)

> > > Source/WTF/wtf/SegmentedVector.h:-44
> > > -        ~SegmentedVectorIterator() { }
> > 
> > I think that was here so that some compiler do not generate a real function for the empty destructor.
> 
> I can recover it easily. But isn't that a compiler bug? as generating a default destructor is so fundamental in C++. If we do think this could happen, shouldn't there be a coding rule saying we have to explicitly provide a destructor for every class in WebKit? Actually there are tons of classes in WebKit that don't have dtor specified.

Yeah, I may be wrong. It is just a vague memory from profiling.

> > > Source/WTF/wtf/SegmentedVector.h:112
> > > +        size_t indexInSegment() const { return m_index; }
> > > +
> > > +        void proceedToNextSegment()
> > > +        {
> > > +            if (++m_segment >= m_vector.m_segments.size()) {
> > > +                // Points to the "end" symbol
> > > +                m_segment = 0;
> > > +                m_index = SegmentSize;
> > > +            } else
> > > +                m_index = 0;
> > > +        }
> > 
> > This is weird. Isn't this the wrong abstraction?
> Why?

This is exposing what SegmentedVector abstract, defeating the purpose of having an adt.

> > Why not give the "copy" capability to SegmentedVector?
> 
> Like SegmentedVector::copyTo(T* dest, size_t pos, size_t len)? yeah, probably better.

Yep, that sounds good.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list