View definition

func New(cmp BasicComparer, capacity int) *DB

Defined in


New creates a new initialized in-memory key/value DB. The capacity is the initial key/value buffer capacity. The capacity is advisory, not enforced.

This DB is append-only, deleting an entry would remove entry node but not reclaim KV buffer.

The returned DB instance is safe for concurrent use.