
/*
 * (c) Copyright 1992 Conor P. Cahill (uunet!virtech!cpcahil).  
 * You may copy, distribute, and use this software as long as this
 * copyright statement is not removed.
 */
/*
 * Author(s):
 *  pds - Paul D. Smith (paul_smith@dg.com)
 */
/*
 * This module defines several libc internal interfaces to the allocation
 * and/or memory routines under DG/UX.
 */

/*
 * Added "_" components to make sure that libc versions of other
 * malloc interfaces called by various libc routines (eg. getcwd) that
 * must be used from libc do not have competing malloc implementations.
 */
#include <stdio.h>
#include "mallocin.h"

DATATYPE *
_malloc(size)
    SIZETYPE size;
{
    return( debug_malloc(NULL,-1,size) );
}

DATATYPE *
_realloc(cptr,size)
	DATATYPE  * cptr;
	SIZETYPE    size;
{
    return( debug_realloc(NULL,-1,cptr,size) );
}

DATATYPE *
_calloc(nelem,elsize)
	SIZETYPE 	  nelem;
	SIZETYPE 	  elsize;
{
    return( debug_calloc(NULL,-1,nelem,elsize) );
}

void
_free(cptr)
	DATATYPE	* cptr;
{
    debug_free(NULL,0,cptr);
}

int
_mallopt(cmd,value)
	int			        cmd;
	union dbmalloptarg    value;
{
    return( dbmallopt(cmd,&value) );
}

MEMDATA  *
_bcopy(ptr2, ptr1, len)
	CONST MEMDATA	* ptr2;
	MEMDATA		* ptr1;
	MEMSIZE		  len;
{
	return( DBbcopy((char *)NULL,0,ptr2,ptr1,len) );
}

MEMDATA  *
_bzero(ptr1, len)
	MEMDATA		* ptr1;
	MEMSIZE		  len;
{
	return( DBbzero((char *)NULL,0,ptr1,len) );
}

int
_bcmp(ptr2, ptr1, len)
	CONST MEMDATA	* ptr1;
	CONST MEMDATA	* ptr2;
	MEMSIZE		  len;
{
	return( DBbcmp((char *)NULL,0,ptr2, ptr1, len) );
}

MEMDATA  *
__dg_bcopy(ptr2, ptr1, len)
	CONST MEMDATA	* ptr2;
	MEMDATA		* ptr1;
	MEMSIZE		  len;
{
	return( DBbcopy((char *)NULL,0,ptr2,ptr1,len) );
}

MEMDATA  *
__dg_bzero(ptr1, len)
	MEMDATA		* ptr1;
	MEMSIZE		  len;
{
	return( DBbzero((char *)NULL,0,ptr1,len) );
}

int
__dg_bcmp(ptr2, ptr1, len)
	CONST MEMDATA	* ptr1;
	CONST MEMDATA	* ptr2;
	MEMSIZE		  len;
{
	return( DBbcmp((char *)NULL,0,ptr2, ptr1, len) );
}


/*
 * $Log: dgmalloc.c,v $
 * Revision 1.3  1992/07/03  00:03:25  cpcahil
 * more fixes for pl13, several suggestons from Rich Salz.
 *
 * Revision 1.2  1992/07/02  15:35:52  cpcahil
 * misc cleanups for PL13
 *
 * Revision 1.1  1992/05/06  04:53:29  cpcahil
 * performance enhancments
 *
 */
