Skip to content

Commit

Permalink
Rollup merge of rust-lang#39937 - arthurprs:hm-adapt, r=frewsxcv
Browse files Browse the repository at this point in the history
Fix spelling in hashmap comments

Fixing my bad english from rust-lang#38368

Note to self: triple check spelling/grammar
  • Loading branch information
frewsxcv authored Feb 20, 2017
2 parents 8918ceb + 3b4412a commit 7ef0192
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/libstd/collections/hash/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ impl DefaultResizePolicy {
// ----------------------
// To protect against degenerate performance scenarios (including DOS attacks),
// the implementation includes an adaptive behavior that can resize the map
// early (before it's capacity is exceeded) when suspiciously long probe or
// foward shifts sequences are encounted.
// early (before its capacity is exceeded) when suspiciously long probe or
// forward shifts sequences are encountered.
//
// With this algorithm in place it would be possible to turn a CPU attack into
// a memory attack due to the agressive resizing. To prevent that the
// a memory attack due to the aggressive resizing. To prevent that the
// adaptive behavior only triggers when the map occupancy is half the maximum occupancy.
// This reduces the effectivenes of the algorithm but also makes it completelly safe.
// This reduces the effectiveness of the algorithm but also makes it completely safe.
//
// The previous safety measure that also prevents degenerate iteractions with
// The previous safety measure also prevents degenerate interactions with
// really bad quality hash algorithms that can make normal inputs look like a
// DOS attack.
//
Expand Down

0 comments on commit 7ef0192

Please sign in to comment.