Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
i
j
m
n
o
p
r
s
t
u
x
+
Functions
a
b
c
d
e
i
j
m
o
p
r
s
t
u
x
Variables
Typedefs
Enumerations
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
w
x
+
Variables
a
c
f
h
i
k
l
m
n
o
p
r
s
t
x
Typedefs
Related Functions
+
Files
File List
+
File Members
All
Functions
Macros
Realloc.h
1
/*
2
@copyright Russell Standish 2000-2013
3
@author Russell Standish
4
This file is part of Classdesc
5
6
Open source licensed under the MIT license. See LICENSE for details.
7
*/
8
9
/*
10
Reimplement realloc to be be non memory-leaking version of what the
11
man page says. By redefining Realloc, the user can replace this by
12
a version of their choice.
13
*/
14
#include <iostream>
15
#ifndef REALLOC_H
16
#define REALLOC_H
17
#include <cstdlib>
18
namespace
classdesc
19
{
20
inline
void
*realloc(
void
*x, std::size_t s)
21
{
22
if
(s && x)
23
return
std::realloc(x,s);
24
else
if
(s)
25
return
std::malloc(s);
26
else
27
std::free(x);
28
return
NULL;
29
}
30
}
31
#endif
classdesc
Contains definitions related to classdesc functionality.
Definition:
arrays.h:2514
include
Realloc.h
Generated by
1.8.13