A chunk of memory intended for short time cashing of larger data chunks.
◆ JMemoryChunk
◆ j_memory_chunk_free()
Frees the memory allocated for the chunk.
...
j_memory_chunk_free(chunk);
Definition: jmemory-chunk.c:43
- Parameters
-
◆ j_memory_chunk_get()
gpointer j_memory_chunk_get |
( |
JMemoryChunk * |
chunk, |
|
|
guint64 |
length |
|
) |
| |
Gets a new segment from the chunk.
...
j_memory_chunk_get(chunk, 1024);
- Parameters
-
chunk | A chunk. |
length | A length. |
- Returns
- A pointer to a segment of the chunk, NULL if not enough space is available.
◆ j_memory_chunk_new()
Creates a new chunk.
JMemoryChunk * j_memory_chunk_new(guint64 size)
Definition: jmemory-chunk.c:61
- Parameters
-
- Returns
- A new chunk. Should be freed with j_memory_chunk_free().
◆ j_memory_chunk_reset()
Resets the given chunk. All data inside should be considered lost.
- Parameters
-