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

Reading chunks from a large file fails #1233

Open
7adidaz opened this issue Mar 31, 2024 · 2 comments
Open

Reading chunks from a large file fails #1233

7adidaz opened this issue Mar 31, 2024 · 2 comments

Comments

@7adidaz
Copy link

7adidaz commented Mar 31, 2024

I'm trying to read a chunk of size 50 MB from a ~130 MB file, I'm using RNFS.read, according to docs this reads a specific length starting from an offset, but this 50MB chunk tries to allocate memory equal to the whole file size and this fails due to ram size.

Tried with 15 MB, and it worked like a charm.
Tried with 30 MB, but it tried to allocate 80 MB of RAM which failed.

Am I missing something here? why it does try to allocate more memory than it need?

@sagark1510
Copy link

Same problem. @7adidaz did you find any solution?

@7adidaz
Copy link
Author

7adidaz commented Jul 18, 2024

@sagark1510 nope, if I remember correctly, there was a memory leak related to this function, check out: 785

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