Code:
#include <stdio.h>
#include "memory.h"
#define POOL_SIZE 10
// pool of memory
struct record pool[POOL_SIZE];
struct record * top=pool; // pool is constant; a pointer to the stack top.
void init_pool() // Initialize the pool
{
int i;
struct record *r=pool;
struct record *s;
pool[POOL_SIZE-1].next=NULL;