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

KDECore

Defines | Typedefs | Functions

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 <QtCore/QMutex>
#include <QtCore/QMutexLocker>
#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.

Defines

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

Typedefs

typedef qint32 pageID

Functions

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

Define Documentation

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

Definition at line 183 of file kshareddatacache.cpp.


Typedef Documentation

typedef qint32 pageID

Definition at line 237 of file kshareddatacache.cpp.


Function Documentation

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

Definition at line 191 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 155 of file kshareddatacache.cpp.

template<class T >
T intCeil ( T  a,
T  b 
)
Returns:
the smallest integer greater than or equal to (a / b).
Parameters:
aNumerator, should be ≥ 0.
bDenominator, should be > 0.

Definition at line 232 of file kshareddatacache.cpp.

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

Definition at line 52 of file kshareddatacache.cpp.

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

Definition at line 220 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 212 of file kshareddatacache.cpp.

KDECore

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal