2 * File: MemoryMgr.c $XConsortium: MemoryMgr.c /main/3 1995/10/26 15:34:54 rswiston $
5 * (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
7 * (c) Copyright 1993, 1994 Hewlett-Packard Company *
8 * (c) Copyright 1993, 1994 International Business Machines Corp. *
9 * (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
10 * (c) Copyright 1993, 1994 Novell, Inc. *
13 #ifdef DOMAIN_ALLOW_MALLOC_OVERRIDE
14 #include "/usr/include/apollo/shlib.h"
17 #include <bms/sbport.h> /* NOTE: sbport.h must be the first include. */
20 #include <bms/XeUserMsg.h>
21 #include <bms/MemoryMgr.h>
24 #define CPLUSPLUS_MALLOC_TYPE (malloc_t)
26 #define CPLUSPLUS_MALLOC_TYPE
29 /*-----------------------------------------------------------------------+*/
30 void * XeMalloc( size_t size )
31 /*-----------------------------------------------------------------------+*/
36 if (ptr = malloc(size)) {
37 *ptr = (XeChar)NULL; /* Force first byte to NULL for bozos who */
38 /* think malloc zeros memory! */
42 _DtSimpleError(XeProgName, XeError, XeString_NULL,
43 "><DtEncap: cannot malloc memory");
48 /*-----------------------------------------------------------------------+*/
49 void XeFree( void * ptr )
50 /*-----------------------------------------------------------------------+*/