Doubles the bucket capacity and rehashes every stored pair.
Allocates a new bucket array of twice the current capacity, swaps it in and redistributes the existing pairs into it. The pairs themselves are moved, not reallocated. On failure the previous bucket array is restored, leaving the map unchanged.
- Note
- Pairs are transferred between bucket arrays; their keys and values are never freed by a successful resize.
- Parameters
-
| map | Pointer to an initialized map (borrowed). |
- Returns
- true on success, false on memory allocation failure.