|
From: Erik C. <er...@ar...> - 2003-10-01 19:17:18
|
On Wed, Oct 01, 2003 at 06:54:20PM +0100, Nicholas Nethercote wrote: > On Wed, 1 Oct 2003, Jeremy Fitzhardinge wrote: > > > > * If you generate a new pointer/integer by math between two operands > > > with different malloc-area sets then the new integer gets the union > > > of the sets. > > > > Yep, this is what I suggested. > > But the sets become huge (eg. 1000s of entries), which slows things down > horrifically. If a pointer is dereferenced then you can reduce that set to one single segment, namely the segment it points at when it is dereferenced. > Besides, when you do the pointer subtraction, that > "connection" between them is really a property of the ptrdiff, not a > property of the segments, so putting the two segments into the same set > isn't a true reflection of what's happening. > > These two reasons are why I think having a dedicated ptrdiff type is a > better solution. For the record, that is what I was suggesting in the "simple" suggestion snipped above. It's the new integer (ptrdiff) that is assigned the union of the sets, not all pointers into the sets. > Although I haven't implemented it yet, so I'm yet to see > how it works in practice. The idea you explained the other day is a more complex (accurate) version of the "just taking the union" idea above. The question is whether it gives too many false alarms. -- Erik Corry er...@ar... A: Because it messes up the order in which people normally read text. Q: Why is top-replying such a bad thing? A: Top-replying. Q: What is the most annoying thing in email? |