PARCHashMap * parcHashMap_Create(void) { PARCHashMap *result = parcHashMap_CreateCapacity(DEFAULT_CAPACITY); return result; }
static void _athenaLRUContentStore_initializeIndexes(AthenaLRUContentStore *impl, size_t capacityInBytes) { // // NOTE: Calculating the number of buckets for the hashmaps is a temporary workaround for // PARCHashMap not yet implementing internal resizing. See BugzId: 3950 // unsigned int numBuckets = _calculateNumberOfInitialBucketsBasedOnCapacityInBytes(capacityInBytes); impl->tableByName = parcHashMap_CreateCapacity(numBuckets); impl->tableByNameAndKeyId = parcHashMap_CreateCapacity(numBuckets); impl->tableByNameAndObjectHash = parcHashMap_CreateCapacity(numBuckets); impl->listByRecommendedCacheTime = parcSortedList_CreateCompare( (PARCSortedListEntryCompareFunction) _compareByRecommendedCacheTime); impl->listByExpiryTime = parcSortedList_CreateCompare((PARCSortedListEntryCompareFunction) _compareByExpiryTime); impl->lruHead = NULL; impl->lruTail = NULL; impl->currentSizeInBytes = 0; }