btree

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFreeListSize = 32
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BTree

type BTree struct {
	// contains filtered or unexported fields
}

func New

func New(degree int) *BTree

func NewWithFreeList

func NewWithFreeList(degree int, f *FreeList) *BTree

type FreeList

type FreeList struct {
	// contains filtered or unexported fields
}

------------- FreeList ------------- FreeList 空间表,一种特定动态内存分配方案的数据结构。它通过指针把固定大小内存块组织成内存池,当需要内存分配的时候,优先从空间表中分配。 从而,避免频繁的内存分配。使用场景也很明显,就是频繁发生内存分配的场景。

func NewFreeList

func NewFreeList(size int) *FreeList

type Item

type Item interface {
	Less(than Item) bool
}

type ItemIterator

type ItemIterator func(i Item) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL