fix AtomicUnorderedInsertMap load factor computation
authorNathan Bronson <ngbronson@fb.com>
Sat, 24 Oct 2015 02:48:25 +0000 (19:48 -0700)
committerfacebook-github-bot-9 <folly-bot@fb.com>
Sat, 24 Oct 2015 03:20:22 +0000 (20:20 -0700)
commit6b17defc455a4b8fb0a57dd23ccdcc4edba91ac5
treee80df30931f06200943b3f3af2c0f62a70059322
parentbc857f03fc85a34e84ae8fcdf2d910259940f711
fix AtomicUnorderedInsertMap load factor computation

Summary: AtomicUnorderedInsertMap's constructor takes a maxLoadFactor argument,
which is given its default argument of 0.8f in all of our code.
The clipping function that was supposed to prevent load factors
greater than one was inverted, resulting in all of our code using a
maxLoadFactor of 1 instead of 0.8.  This diff fixes the computation,
as well as changing all of the use sites so that the actual memory
allocated by existing clients does not change.

Reviewed By: yfeldblum

Differential Revision: D2575238

fb-gh-sync-id: bb9dd8de53114236b259631d175d62af098391cf
folly/AtomicUnorderedMap.h
folly/test/AtomicUnorderedMapTest.cpp