xapian-core  2.0.0
Macros | Variables
honey_freelist.cc File Reference

Honey freelist. More...

#include <config.h>
#include "honey_freelist.h"
#include "honey_table.h"
#include "xapian/error.h"
#include "omassert.h"
#include "popcount.h"
#include "wordaccess.h"
#include <cstring>
+ Include dependency graph for honey_freelist.cc:

Go to the source code of this file.

Macros

#define FREELIST_END   block_size
 

Variables

const unsigned C_BASE = 8
 The first offset to use for storing free block info. More...
 
const uint4 UNUSED = static_cast<uint4>(-1)
 Invalid freelist block value, so we can detect overreading bugs, etc. More...
 

Detailed Description

Honey freelist.

Definition in file honey_freelist.cc.

Macro Definition Documentation

◆ FREELIST_END

#define FREELIST_END   block_size

Definition at line 44 of file honey_freelist.cc.

Variable Documentation

◆ C_BASE

const unsigned C_BASE = 8

The first offset to use for storing free block info.

The first 4 bytes store the revision. The next byte (which is the level for a block in the B-tree) is set to LEVEL_FREELIST to mark this as a freelist block).

Definition at line 53 of file honey_freelist.cc.

Referenced by HoneyFreeList::get_block(), HoneyFreeList::mark_block_unused(), and HoneyFreeList::walk().

◆ UNUSED

const uint4 UNUSED = static_cast<uint4>(-1)

Invalid freelist block value, so we can detect overreading bugs, etc.

Definition at line 56 of file honey_freelist.cc.

Referenced by HoneyFreeList::commit(), HoneyFreeList::get_block(), HoneyFreeList::mark_block_unused(), and HoneyFreeList::walk().