ladybird/Base/usr/share/man/man2/create_shared_buffer.md
Sergey Bugaev 8fbcfa934a Base: Add some "See also" links to the man pages
We can do this now that we have link support in LibMarkdown and LibHTML ^)
2019-10-03 08:23:54 +02:00

696 B

Name

create_shared_buffer - create a shareable memory buffer

Synopsis

#include <SharedBuffer.h>

int create_shared_buffer(int size, void** buffer);

Description

Creates a new memory region that can be shared with other processes. The region is only accessible to the creating process by default.

Return value

If a region is successfully created, create_shared_buffer() stores a pointer to the memory in buffer and returns a buffer ID. Otherwise, it returns -1 and sets errno to describe the error.

Errors

  • EINVAL: size is zero or negative.
  • EFAULT: buffer is not a valid address.

See also