ADOL-C: Automatic Differentiation in C/C++
2.7.3
Loading...
Searching...
No Matches
ADOL-C
include
adolc
rpl_malloc.h
Go to the documentation of this file.
1
/*----------------------------------------------------------------------------
2
ADOL-C -- Automatic Differentiation by Overloading in C++
3
File: malloc.h
4
Revision: $Id$
5
Contents: malloc replacements for not gnu compatible malloc system functions
6
7
Copyright (c) Andrea Walther, Andreas Griewank, Andreas Kowarz,
8
Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel
9
10
This file is part of ADOL-C. This software is provided as open source.
11
Any use, reproduction, or distribution of the software constitutes
12
recipient's acceptance of the terms of the accompanying license file.
13
14
----------------------------------------------------------------------------*/
15
16
#if !defined(ADOLC_MALLOC_H)
17
#define ADOLC_MALLOC_H 1
18
19
#if defined(ADOLC_INTERNAL)
20
#if defined(HAVE_CONFIG_H)
21
#include "config.h"
22
23
#undef ADOLC_NO_MALLOC
24
#undef ADOLC_NO_REALLOC
25
#if !defined(HAVE_MALLOC)
26
#define ADOLC_NO_MALLOC 1
27
#else
28
#if (HAVE_MALLOC == 0)
29
#define ADOLC_NO_MALLOC 1
30
#endif
/* HAVE_MALLOC == 0 */
31
#endif
/* HAVE_MALLOC */
32
#if !defined(HAVE_REALLOC)
33
#define ADOLC_NO_REALLOC 1
34
#else
35
#if (HAVE_REALLOC == 0)
36
#define ADOLC_NO_REALLOC 1
37
#endif
/* HAVE_REALLOC == 0 */
38
#endif
/* HAVE_REALLOC */
39
40
#if defined(ADOLC_NO_MALLOC)
41
#include <stddef.h>
42
#if defined(__cplusplus)
43
extern
"C"
{
44
#endif
/* __cplusplus */
45
#undef rpl_malloc
46
#undef rpl_calloc
47
extern
void
*rpl_malloc(
size_t
);
48
extern
void
*rpl_calloc(
size_t
,
size_t
);
49
#if defined(__cplusplus)
50
}
51
#endif
/* __cplusplus */
52
#endif
/* ADOLC_NO_MALLOC */
53
54
#if defined(ADOLC_NO_REALLOC)
55
#include <stddef.h>
56
#if defined(__cplusplus)
57
extern
"C"
{
58
#endif
/* __cplusplus */
59
#undef rpl_realloc
60
extern
void
*rpl_realloc(
void
*,
size_t
);
61
#if defined(__cplusplus)
62
}
63
#endif
/* __cplusplus */
64
#endif
/* ADOLC_NO_REALLOC */
65
66
#endif
/* HAVE_CONFIG_H */
67
#endif
/* ADOLC_INTERNAL */
68
#endif
/* ADOLC_MALLOC_H */
Generated by
1.9.8