-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rg_storage: scandir now uses a callback system to save memory
Previously on large lists (2000+) it could fail because no contiguous block large enough could be allocated. I tried a few methods to work around it (make multiple smaller allocations, use a bucket system, use a linked list). But they all had the issue that they had to be freed correctly + they were slower + they caused fragmentation. Now it no longer returns an array but takes a callback to run on every file. Which makes it a tad more annoying to use, but oh well. On the bright side, filenames are no longer limited to 90 characters!
- Loading branch information
Showing
5 changed files
with
158 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.