Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Remove temporary (anonymous) backing files on gc() #92

Open
jonpeake opened this issue Dec 11, 2018 · 1 comment
Open

Suggestion: Remove temporary (anonymous) backing files on gc() #92

jonpeake opened this issue Dec 11, 2018 · 1 comment

Comments

@jonpeake
Copy link

jonpeake commented Dec 11, 2018

After monitoring disk usage and watching the size of my /tmp folder increase steadily with each new big.matrix, I finally noticed the line in the package description about these not being deleted automatically until the R session is closed. I'm not even sure if this is possible, but if it is, it would be nice if we were able to automatically remove anonymous backing files after the R-object is deleted and gc() is called. Just something to think about.

@kaneplusplus
Copy link
Owner

I think it's a good suggestion. Your '/tmp' file is probably filling up because of the temporary objects that are created during matrix computations with bigmemory. Under normal circumstances, we don't know if the binary file is going to be used beyond the scope of the big.matrix object that references it. You could add a flag that says delete this object in the finalizer. If we do this, we'd have to make sure there is a mechanism for a "temporary" big.matrix object to become a persistent one so that if the matrix you are interested in is returned as temporary, there is a mechanism to save it.

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

No branches or pull requests

2 participants