VirtualBox

source: kBuild/trunk/src/kmk/electric.h@ 1075

Last change on this file since 1075 was 915, checked in by bird, 18 years ago

some more electric heap stuff.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1/* $Id: electric.h 915 2007-05-24 05:00:18Z bird $ */
2/** @file
3 *
4 * A simple electric heap implementation, wrapper header.
5 *
6 * Copyright (c) 2007 knut st. osmundsen <[email protected]>
7 *
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as published
11 * by the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with This program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 */
24
25#ifdef ELECTRIC_HEAP
26
27#include <stdlib.h>
28#ifdef WINDOWS32
29# include <malloc.h>
30#endif
31#include <string.h> /* strdup */
32
33void xfree (void *);
34void *xcalloc (size_t, size_t);
35void *xmalloc (unsigned int);
36void *xrealloc (void *, unsigned int);
37char *xstrdup (const char *);
38
39#define free(a) xfree(a)
40#define calloc(a,b) xcalloc((a),(b))
41#define malloc(a) xmalloc(a)
42#define realloc(a,b) xrealloc((a),(b))
43#define strdup(a) xstrdup(a)
44
45#endif
46
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette