VirtualBox

source: kBuild/trunk/src/gmakenew/electric.h@ 909

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

A very simple electric fence heap (windows only for now).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1/* $Id: electric.h 909 2007-05-24 03:09:09Z 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
32void xfree (void *);
33void *xcalloc (size_t, size_t);
34void *xmalloc (unsigned int);
35void *xrealloc (void *, unsigned int);
36char *xstrdup (const char *);
37
38#define free(a) xfree(a)
39#define calloc(a,b) xcalloc((a),(b))
40#define malloc(a) xmalloc(a)
41#define realloc(a,b) xrealloc((a),(b))
42#define strdup(a) xstrdup(a)
43
44#endif
45
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