1BSON_ALIGNED_ALLOC(3)               libbson              BSON_ALIGNED_ALLOC(3)
2
3
4

SYNOPSIS

6          void *
7          bson_aligned_alloc (size_t alignment, size_t num_bytes);
8

PARAMETERS

10alignment:  The alignment of the allocated bytes of memory. Must be a
11         power of 2 and a multiple of sizeof (void *).
12
13num_bytes: The number of bytes to allocate. Must  be  a  multiple  of
14         alignment.
15

DESCRIPTION

17       This is a portable aligned_alloc() wrapper.
18
19       In   general,   this  function  will  return  an  allocation  at  least
20       sizeof(void*) bytes or bigger with an alignment of at least alignment.
21
22       If there was a failure to allocate num_bytes bytes  aligned  to  align‐
23       ment, the process will be aborted.
24
25       WARNING:
26          This function will abort on failure to allocate memory.
27

RETURNS

29       A pointer to a memory region which HAS NOT been zeroed.
30

AUTHOR

32       MongoDB, Inc
33
35       2017-present, MongoDB, Inc
36
37
38
39
401.25.1                           Nov 08, 2023            BSON_ALIGNED_ALLOC(3)
Impressum