-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cgofuse: refactor file table slice implementation
The old version would grow the slice capacity when needed, but only modify the slice's length when extending the capacity. So even if the slice had capacity to store an entry, we were only checking for empty slots up to the length. We now reslice to length+1 if we have the capacity, and reallocate if we don't. The slice type was also abstracted to break the logic up a little.
- Loading branch information
Showing
1 changed file
with
49 additions
and
17 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