mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-23 09:54:14 +00:00
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8689 d0543943-73ff-0310-b7d9-9358b9ac24b2
39 lines
590 B
C
39 lines
590 B
C
/*
|
|
File: exprmem.c
|
|
Auth: Brian Allen Vanderburg II
|
|
Date: Wednesday, April 30, 2003
|
|
Desc: Memory functions for ExprEval
|
|
|
|
This file is part of ExprEval.
|
|
*/
|
|
|
|
/* Includes */
|
|
#include "exprincl.h"
|
|
|
|
#include "exprmem.h"
|
|
|
|
/* Allocate memory and zero it */
|
|
void *exprAllocMem(size_t size)
|
|
{
|
|
void *data = malloc(size);
|
|
|
|
if (data) {
|
|
memset(data, 0, size);
|
|
}
|
|
|
|
return data;
|
|
}
|
|
|
|
/* Free memory */
|
|
void exprFreeMem(void *data)
|
|
{
|
|
if (data)
|
|
free(data);
|
|
}
|
|
|
|
/* Allocate a list of nodes */
|
|
exprNode *exprAllocNodes(size_t count)
|
|
{
|
|
return exprAllocMem(count * sizeof(exprNode));
|
|
}
|