• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • kdecore
  • util
Macros | Typedefs | Functions | Variables
kshareddatacache.cpp File Reference
#include "kshareddatacache.h"
#include "kshareddatacache_p.h"
#include <kdebug.h>
#include <kglobal.h>
#include <kstandarddirs.h>
#include <krandom.h>
#include <QtCore/QDateTime>
#include <QtCore/QSharedPointer>
#include <QtCore/QByteArray>
#include <QtCore/QFile>
#include <QtCore/QAtomicInt>
#include <QtCore/QList>
#include <sys/types.h>
#include <sys/mman.h>
#include <stdlib.h>
#include <stddef.h>
Include dependency graph for kshareddatacache.cpp:

Go to the source code of this file.

Macros

#define ALIGNOF(x)   (__alignmentHack<x>::size)
 

Typedefs

typedef qint32 pageID
 

Functions

template<class T >
T * alignTo (const void *start, uint size=ALIGNOF(T))
 
static unsigned countSetBits (unsigned value)
 
static quint32 generateHash (const QByteArray &buffer)
 
static unsigned intCeil (unsigned a, unsigned b)
 
int ksdcArea ()
 
static unsigned int MurmurHashAligned (const void *key, int len, unsigned int seed)
 
template<class T >
const T * offsetAs (const void *const base, qint32 offset)
 
template<class T >
T * offsetAs (void *const base, qint32 offset)
 

Variables

static const uint MAX_PROBE_COUNT = 6
 

Macro Definition Documentation

#define ALIGNOF (   x)    (__alignmentHack<x>::size)

Definition at line 209 of file kshareddatacache.cpp.

Typedef Documentation

typedef qint32 pageID

Definition at line 283 of file kshareddatacache.cpp.

Function Documentation

template<class T >
T* alignTo ( const void *  start,
uint  size = ALIGNOF(T) 
)

Definition at line 217 of file kshareddatacache.cpp.

static unsigned countSetBits ( unsigned  value)
static
Returns
number of set bits in value (see also "Hamming weight")

Definition at line 271 of file kshareddatacache.cpp.

static quint32 generateHash ( const QByteArray &  buffer)
static

This is the hash function used for our data to hopefully make the hashing used to place the QByteArrays as efficient as possible.

Definition at line 181 of file kshareddatacache.cpp.

static unsigned intCeil ( unsigned  a,
unsigned  b 
)
static
Returns
the smallest integer greater than or equal to (a / b).
Parameters
aNumerator, should be ≥ 0.
bDenominator, should be > 0.

Definition at line 257 of file kshareddatacache.cpp.

int ksdcArea ( )

Definition at line 47 of file kshareddatacache.cpp.

static unsigned int MurmurHashAligned ( const void *  key,
int  len,
unsigned int  seed 
)
static

Definition at line 78 of file kshareddatacache.cpp.

template<class T >
const T* offsetAs ( const void *const  base,
qint32  offset 
)

Returns a pointer to a const object of type T, assumed to be offset BYTES greater than the base address.

Note that in order to meet alignment requirements for T, it is possible that the returned pointer points greater than offset into base.

Definition at line 238 of file kshareddatacache.cpp.

template<class T >
T* offsetAs ( void *const  base,
qint32  offset 
)

Definition at line 246 of file kshareddatacache.cpp.

Variable Documentation

const uint MAX_PROBE_COUNT = 6
static

The maximum number of probes to make while searching for a bucket in the presence of collisions in the cache index table.

Definition at line 45 of file kshareddatacache.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal