/*
**    Name: rmamalloc.c
**
**    Date: Sun Jan  5 16:30:54 2003
**
*/

#include "rmamem.h"
#include <stdio.h>

char *rmadebugmalloc(int line,char *file,size_t size)
    {
    FILE *fh;

    char *ptr;

    fh = fopen("ram::0.$.deb","a");
    if (fh != NULL)
        {
        fprintf(fh,"rmadebugmalloc: %s %d  size: %d\n",
                file,line,size);
        fclose(fh);
        }

    ptr = rmamalloc(size);

    fh = fopen("ram::0.$.deb","a");
    if (fh != NULL)
        {
        fprintf(fh,"rmadebugmalloc:   got %d\n",
                ptr);
        fclose(fh);
        }

    return ptr;
    }
