#include <stddef.h>
Go to the source code of this file.
|
| void * | IDSharedBlobAlloc (size_t size) |
| | Allocate a buffer suitable for fast exchange over local links. Warning : the buffer will be sealed (readonly) once exchanged.
|
| |
| void * | IDSharedBlobAttach (int fd, size_t size) |
| |
| void | IDSharedBlobFree (void *ptr) |
| | Free a buffer allocated using IDSharedBlobAlloc. Fall back to free for buffer that are not shared blob Must be used for IBLOB.data.
|
| |
| void | IDSharedBlobDettach (void *ptr) |
| | Dettach a blob, but don't close its FD.
|
| |
| void * | IDSharedBlobRealloc (void *ptr, size_t size) |
| | Adjust the size of a buffer obtained using IDSharedBlobAlloc.
|
| |
| int | IDSharedBlobGetFd (void *ptr) |
| | Return the filedescriptor backing up the given shared buffer.
|
| |
| void | IDSharedBlobSeal (void *ptr) |
| | Seal (make readonly) a buffer allocated using IDSharedBlobAlloc. This is automatic when IDNewBlob.
|
| |
◆ IDSharedBlobAlloc()
| void * IDSharedBlobAlloc |
( |
size_t |
size | ) |
|
|
extern |
Allocate a buffer suitable for fast exchange over local links. Warning : the buffer will be sealed (readonly) once exchanged.
- Parameters
-
| size_t | size of the memory area to allocate |
Definition at line 73 of file sharedblob.c.
◆ IDSharedBlobAttach()
| void * IDSharedBlobAttach |
( |
int |
fd, |
|
|
size_t |
size |
|
) |
| |
|
extern |
Attach to a received shared buffer by ID The returned buffer cannot be realloced or sealed.
- Returns
- null on error + errno (invalid fd / system resources)
Definition at line 109 of file sharedblob.c.
◆ IDSharedBlobDettach()
| void IDSharedBlobDettach |
( |
void * |
ptr | ) |
|
|
extern |
Dettach a blob, but don't close its FD.
Definition at line 165 of file sharedblob.c.
◆ IDSharedBlobFree()
| void IDSharedBlobFree |
( |
void * |
ptr | ) |
|
|
extern |
Free a buffer allocated using IDSharedBlobAlloc. Fall back to free for buffer that are not shared blob Must be used for IBLOB.data.
Definition at line 139 of file sharedblob.c.
◆ IDSharedBlobGetFd()
| int IDSharedBlobGetFd |
( |
void * |
ptr | ) |
|
|
extern |
Return the filedescriptor backing up the given shared buffer.
- Returns
- the filedescriptor or -1 if not a shared buffer pointer
Definition at line 265 of file sharedblob.c.
◆ IDSharedBlobRealloc()
| void * IDSharedBlobRealloc |
( |
void * |
ptr, |
|
|
size_t |
size |
|
) |
| |
|
extern |
Adjust the size of a buffer obtained using IDSharedBlobAlloc.
- Parameters
-
| size_t | size of the memory area to allocate |
Definition at line 186 of file sharedblob.c.
◆ IDSharedBlobSeal()
| void IDSharedBlobSeal |
( |
void * |
ptr | ) |
|
|
extern |
Seal (make readonly) a buffer allocated using IDSharedBlobAlloc. This is automatic when IDNewBlob.
- Parameters
-
| size_t | size of the memory area to allocate |
Definition at line 281 of file sharedblob.c.