---
name: "rbhash_new"
section: "3"
platform: "linux"
package: "libroy-dev"
version: "1.0.8-1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/rbhash_new"
---

# rbhash\_new(3)

allocate a new rbhash

## NAME

rbhash\_new - allocate a new rbhash

## SYNOPSIS

\#include \<roy.h\>

RBHash \* rbhash\_new (void);

## DESCRIPTION

Create a new structure to hold a hash.  No compare or hashing functions are supplied to *rbhash\_new()* as it is always used for RBuf keys.

## RETURN VALUE

This function will always succeed in returning a newly allocated RBHash structure.  This structure should later be freed using [*rbhash\_free*(3)](/rbhash_free/3.md).

## ERRORS

The [*rbhash\_new*(3)](/rbhash_new/3.md) call will never return any failure condition. Any out of memory issues are delt with by [*rmem*(3)](/rmem/3.md) functions.

## SEE ALSO

[*rbhash*(3)](/rbhash/3.md), [*rbhash\_entry\_getkey*(3)](/rbhash_entry_getkey/3.md),  [*rbhash\_entry\_setkey*(3)](/rbhash_entry_setkey/3.md), [*rbhash\_free*(3)](/rbhash_free/3.md),  [*rbhash\_insert*(3)](/rbhash_insert/3.md), [*rbhash\_len*(3)](/rbhash_len/3.md),  [*rbhash\_lookup*(3)](/rbhash_lookup/3.md), [*rbhash\_lookup\_next*(3)](/rbhash_lookup_next/3.md),  [*rbhash\_remove*(3)](/rbhash_remove/3.md), [*rbhash\_remove\_entry*(3)](/rbhash_remove_entry/3.md),  [*roy*(3)](/roy/3.md)
