This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/ProbLog/simplecudd_lfi/allocate.c

60 lines
840 B
C

/******************************************************************
**
** ALLOCATE.C:
**
** Allocation Routines
**
** This file is part of Apt Computing Tools (ACT)
** Copyright (c) 1991 -- Apt Technologies
** All rights reserved
**
******************************************************************/
/* ---------- C Headers */
//#include "cheaders.h"
/* ---------- Headers */
#include "apt.h"
#include "allocate.h"
/* ---------- Private Globals */
PRIVATE int bytesAllocated = 0;
/* ---------- Functions */
/*
**
** Allocate
**
*/
PUBLIC
#ifdef __ANSI_C__
void *Allocate(int bytes)
#else
void *Allocate(bytes)
int bytes;
#endif
{
bytesAllocated += bytes;
return (void *)calloc(1,bytes);
}
/*
**
** Free
**
*/
PUBLIC
#ifdef __ANSI_C__
void Free(void *memory)
#else
void Free(memory)
void *memory;
#endif
{
free(memory);
}