Garbage Collection Issue

Steven Schveighoffer schveiguy at gmail.com
Sun May 31 16:57:06 UTC 2020


On 5/30/20 9:51 PM, Marius Cristian Baciu wrote:
> I am encountering a strange problem with the GC on a specific platform:
> at the first attempt to clear the current memory pool to make room for a 
> new allocation, the GC considers that the page in which the main thread 
> resides (the one created in the init function of the GC) can be freed.. 
> therefore, frees the entire pool and reallocates at the same location; 
> later, when accessing thread's address, it stumbles upon garbage data.
> The question is: where does the GC expects the address of the thread to 
> be found so that it takes it into consideration?
> A relevant mention would be that the platform doesn't support TLS so it 
> won't find anything when trying to access that data. Could it be related 
> to this?

I can't imagine much of druntime working at all without TLS. Indeed, it 
is a requirement these days.

I believe that's where these roots are being stored.

-Steve


More information about the Digitalmars-d-learn mailing list