Data Structures | Defines | Functions | Variables

RamCacheCLFUS.cc File Reference

A brief file description. More...

#include "P_Cache.h"
#include "I_Tasks.h"
Include dependency graph for RamCacheCLFUS.cc:

Go to the source code of this file.

Data Structures

struct  RamCacheCLFUSEntry
struct  RamCacheCLFUS
class  RamCacheCLFUSCompressor

Defines

#define REQUIRED_COMPRESSION   0.9
#define REQUIRED_SHRINK   0.8
#define HISTORY_HYSTERIA   10
#define ENTRY_OVERHEAD   256
#define LZMA_BASE_MEMLIMIT   (64 * 1024 * 1024)
#define REQUEUE_HITS(_h)   ((_h) ? 1 : 0)
#define CACHE_VALUE_HITS_SIZE(_h, _s)   ((float)((_h)+1) / ((_s) + ENTRY_OVERHEAD))
#define CACHE_VALUE(_x)   CACHE_VALUE_HITS_SIZE((_x)->hits, (_x)->size)
#define check_accounting(_c)

Functions

RamCachenew_RamCacheCLFUS ()

Variables

ClassAllocator
< RamCacheCLFUSEntry
ramCacheCLFUSEntryAllocator ("RamCacheCLFUSEntry")
static const int bucket_sizes []

Detailed Description

A brief file description.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file RamCacheCLFUS.cc.


Define Documentation

#define CACHE_VALUE (   _x  )     CACHE_VALUE_HITS_SIZE((_x)->hits, (_x)->size)

Definition at line 45 of file RamCacheCLFUS.cc.

Referenced by RamCacheCLFUS::put().

#define CACHE_VALUE_HITS_SIZE (   _h,
  _s 
)    ((float)((_h)+1) / ((_s) + ENTRY_OVERHEAD))

Definition at line 44 of file RamCacheCLFUS.cc.

#define check_accounting (   _c  ) 
#define ENTRY_OVERHEAD   256

Definition at line 39 of file RamCacheCLFUS.cc.

#define HISTORY_HYSTERIA   10

Definition at line 38 of file RamCacheCLFUS.cc.

Referenced by RamCacheCLFUS::tick().

#define LZMA_BASE_MEMLIMIT   (64 * 1024 * 1024)

Definition at line 40 of file RamCacheCLFUS.cc.

Referenced by RamCacheCLFUS::get().

#define REQUEUE_HITS (   _h  )     ((_h) ? 1 : 0)
#define REQUIRED_COMPRESSION   0.9

Definition at line 36 of file RamCacheCLFUS.cc.

Referenced by RamCacheCLFUS::compress_entries().

#define REQUIRED_SHRINK   0.8

Definition at line 37 of file RamCacheCLFUS.cc.

Referenced by RamCacheCLFUS::compress_entries().


Function Documentation

RamCache* new_RamCacheCLFUS (  ) 

Definition at line 677 of file RamCacheCLFUS.cc.

Referenced by CacheProcessor::cacheInitialized().


Variable Documentation

const int bucket_sizes[] [static]
Initial value:
 {
  127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071, 262139,
  524287, 1048573, 2097143, 4194301, 8388593, 16777213, 33554393, 67108859,
  134217689, 268435399, 536870909, 1073741789, 2147483647
}

Definition at line 141 of file RamCacheCLFUS.cc.

Referenced by RamCacheCLFUS::put(), and RamCacheCLFUS::resize_hashtable().