diff --git a/src/util/ring-fifo.c b/src/util/ring-fifo.c index 7bc3fae15..5408f9664 100644 --- a/src/util/ring-fifo.c +++ b/src/util/ring-fifo.c @@ -6,14 +6,14 @@ #include "ring-fifo.h" void RingFIFOInit(struct RingFIFO* buffer, size_t capacity, size_t maxalloc) { - buffer->data = malloc(capacity); + buffer->data = anonymousMemoryMap(capacity); buffer->capacity = capacity; buffer->maxalloc = maxalloc; RingFIFOClear(buffer); } void RingFIFODeinit(struct RingFIFO* buffer) { - free(buffer->data); + memoryMapFree(buffer->data, buffer->capacity); buffer->data = 0; }