Util: Use anonymousMemoryMap for RingFIFO memory
Jeffrey Pfau jeffrey@endrift.com
Fri, 04 Sep 2015 01:48:52 -0700
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
src/util/ring-fifo.c
→
src/util/ring-fifo.c
@@ -6,14 +6,14 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#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; }