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

Memory Usage for Large File Operations #22

Closed
XlousZ opened this issue Nov 5, 2021 · 2 comments
Closed

Memory Usage for Large File Operations #22

XlousZ opened this issue Nov 5, 2021 · 2 comments

Comments

@XlousZ
Copy link

XlousZ commented Nov 5, 2021

{
    flare::NoncontiguousBuffer standard_output;
    ......
    auto result = flare::FlattenSlow(output->standard_output);
    auto deps_list = flare::Split(result, '\n');
}

a 400 MB file is cached in standard_output.
After I use it, I find that the memory is still occupied and cannot be released.

@0x804d8000
Copy link
Collaborator

NoncontiguousBuffer is implemented using object pool, memory reclamation may be deferred in certain cases.

By default, several hundreds megabytes memory will be reserved by the object pool. See if memory usage keeps increasing when you cache and free more files.

@XlousZ
Copy link
Author

XlousZ commented Nov 11, 2021

Reaching %5 and no more increasing. Fortunately, my data can be processed by line. Reading data by row to avoid memory usage of large file data.

@XlousZ XlousZ closed this as completed Nov 11, 2021
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