Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / legion / src / generic / include / allocate.h
CommitLineData
920dae64
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: allocate.h
5* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
6* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
7*
8* The above named program is free software; you can redistribute it and/or
9* modify it under the terms of the GNU General Public
10* License version 2 as published by the Free Software Foundation.
11*
12* The above named program is distributed in the hope that it will be
13* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15* General Public License for more details.
16*
17* You should have received a copy of the GNU General Public
18* License along with this work; if not, write to the Free Software
19* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20*
21* ========== Copyright Header End ============================================
22*/
23/*
24 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
26 */
27
28#ifndef _ALLOCATE_H_
29#define _ALLOCATE_H_
30
31#pragma ident "@(#)allocate.h 1.5 06/08/15 SMI"
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37
38extern void * xmalloc(size_t size, int line, char * filep);
39#define Xmalloc(_size) xmalloc(_size, __LINE__, __FILE__)
40
41extern void * xcalloc(size_t num, size_t size, int linen, char * filep);
42#define Xcalloc(_num, _type) xcalloc(_num, sizeof(_type), __LINE__, __FILE__)
43
44extern void xfree(void * p, int, char *);
45#define Xfree(_p) xfree(_p, __LINE__, __FILE__)
46
47extern void * xrealloc(void *, size_t, int, char *);
48#define Xrealloc(_oldp, _size) xrealloc(_oldp, _size, __LINE__, __FILE__)
49
50extern char * xstrdup( char * ptr, int linen, char * filen );
51#define Xstrdup(_s) xstrdup(_s, __LINE__, __FILE__)
52
53
54#ifdef __cplusplus
55}
56#endif
57
58#endif /* _ALLOCATE_H_ */