Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Re-enable the D Garbage Collector #18

Open
markisaa opened this issue Jul 31, 2014 · 3 comments
Open

Re-enable the D Garbage Collector #18

markisaa opened this issue Jul 31, 2014 · 3 comments
Labels

Comments

@markisaa
Copy link
Contributor

We disabled the garbage collector for easy debugging and development. This must be re-enabled before we can ship this to clients. This will likely be a very involved change.

@andralex - Assigning to you, as I believe you mentioned you would be willing to make a pass at this in one of our meetings.

@Gary-Li
Copy link

Gary-Li commented Oct 23, 2014

Hi, has this issue been fixed? My problem is when I try to preview different table data in Tableau, the memory keep increased. So I tried to remove GC.disable() code from driver.d, but the Driver keep crashed when create Presto connection in Tableau. Did I missed anything? And what's the right way to enable GC in presto-odbc?
Thanks in advance!

@markisaa
Copy link
Contributor Author

No this has not been worked on. For now, you will just need to work with it even though it leaks memory.

With the change you suggested you did successfully re-enable the garbage collector, but the code is not written to make proper use of the GC. The GC will not realize that there are references out in C code that point to memory in D... it will then deallocate such pieces of memory (thinking nobody has a reference to them), resulting in a segfault. There are quite a few not-so-obvious holes to patch up before the GC can be re-enabled safely; this is no small job. In the end the goal is to allocate almost nothing via the GC.

@Gary-Li
Copy link

Gary-Li commented Oct 23, 2014

I see. Thanks @markisaa !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants