/*
**    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: %lu\n",
                file,line,(unsigned long)size);
        fclose(fh);
        }

    ptr = rmamalloc(size);

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

    return ptr;
    }
