folly: ubsan: reduce vector size to avoid UBSAN timeout
authorLucian Grijincu <lucian@fb.com>
Wed, 27 Jan 2016 22:33:34 +0000 (14:33 -0800)
committerfacebook-github-bot-0 <folly-bot@fb.com>
Wed, 27 Jan 2016 23:20:23 +0000 (15:20 -0800)
commit94174b55501a035ca9676bb4b3b70717ab455152
tree3a57d457fcd6164e03e37027d9305581db9b1a22
parentbd8108c1056e4bc84744e449456e97b8772d0f14
folly: ubsan: reduce vector size to avoid UBSAN timeout

Summary:
Based on diff where this was introduced in {D360195} it seems like

```
  // This value should we multiple of word size.
  static size_t const kHeapifyCapacitySize = sizeof(
    typename std::aligned_storage<
      sizeof(InternalSizeType),
      alignof(value_type)
    >::type);
  // Threshold to control capacity heapifying.
  static size_t const kHeapifyCapacityThreshold =
    100 * kHeapifyCapacitySize;
```

So anything above 100*sizeof(SizeType) should do.

Reviewed By: philippv

Differential Revision: D2871422

fb-gh-sync-id: a69e47286c53887ac05e89dab565b9d609e183a0
folly/test/small_vector_test.cpp