Garbage collector memory leak "feature"?
Bill Baxter
dnewsgroup at billbaxter.com
Thu Oct 11 07:07:06 PDT 2007
Frits van Bommel wrote:
> Frits van Bommel wrote:
>> Bill Baxter wrote:
>>> Vladimir Panteleev wrote:
>>>> On Thu, 11 Oct 2007 14:44:04 +0300, Frits van Bommel
>>>> <fvbommel at remwovexcapss.nl> wrote:
>> [apparently snipped by Bill]
>>>>
>>>> The question is, however: is conservative scanning of the stack that
>>>> bad? IMO, it's much less problematic just to tell the user to store
>>>> large amounts of pseudo-random/pointer-like data in the heap or in
>>>> static arrays (data segment).
>>>
>>> My thinking exactly. Seems like figuring out how to get classes and
>>> structs with pointers to not scan as all pointers is where the bigger
>>> payoff lies. Stacks don't usually contain much pointer-like random
>>> data I wouldn't think.
>
> For got to mention: I do agree that the heap should be considered a
> priority. I just think that after that, the stack is the next logical
> target[1].
Agreed. There's certainly nothing wrong with trying to make the stack a
safe place for random data. But it's smaller than the heap, and
generally has short-lived data, among other things. So it's not as big
a threat.
--bb
More information about the Digitalmars-d
mailing list