1BSON_ALIGNED_ALLOC0(3)              libbson             BSON_ALIGNED_ALLOC0(3)
2
3
4

NAME

6       bson_aligned_alloc0 - bson_aligned_alloc0()
7

SYNOPSIS

9          void *
10          bson_aligned_alloc0 (size_t alignment, size_t num_bytes);
11

PARAMETERS

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

DESCRIPTION

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

RETURNS

33       A pointer to a memory region which HAS been zeroed.
34

AUTHOR

36       MongoDB, Inc
37
39       2017-present, MongoDB, Inc
40
41
42
43
441.23.1                           Oct 20, 2022           BSON_ALIGNED_ALLOC0(3)
Impressum