Skip to content

Commit

Permalink
extend() optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
dsm9000 committed Aug 24, 2023
1 parent 6983b9e commit b273208
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sdlib/d/gc/tcache.d
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ public:
}

// There must be sufficient free space to extend into:
auto capacity = pd.extent.size - startIndex;
if (capacity < slice.length + length) {
if (pd.extent.size - stopIndex < length) {
return false;
}

Expand Down

0 comments on commit b273208

Please sign in to comment.