A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Define XBT_ATTRIB_DEPRECATED_v326.
[simgrid.git]
/
include
/
smpi
/
sampi.h
diff --git
a/include/smpi/sampi.h
b/include/smpi/sampi.h
index
bdbaa98
..
03155b4
100644
(file)
--- a/
include/smpi/sampi.h
+++ b/
include/smpi/sampi.h
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007-201
8
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-201
9
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-6,7
+6,7
@@
#ifndef SAMPI_H_
#define SAMPI_H_
#ifndef SAMPI_H_
#define SAMPI_H_
-#include
"malloc.h"
+#include
<stdlib.h>
#include <smpi/smpi.h>
#define AMPI_CALL(type, name, args) \
#include <smpi/smpi.h>
#define AMPI_CALL(type, name, args) \
@@
-14,13
+14,18
@@
type AP##name args;
#ifndef HAVE_SMPI
type AP##name args;
#ifndef HAVE_SMPI
+// Internally disable these overrides (HAVE_SMPI is only defined when building the library)
#define malloc(nbytes) _sampi_malloc(nbytes)
#define malloc(nbytes) _sampi_malloc(nbytes)
+#define calloc(n_elm,elm_size) _sampi_calloc(n_elm,elm_size)
+#define realloc(ptr,nbytes) _sampi_realloc(ptr,nbytes)
#define free(ptr) _sampi_free(ptr)
#endif
SG_BEGIN_DECL()
XBT_PUBLIC void* _sampi_malloc(size_t size);
#define free(ptr) _sampi_free(ptr)
#endif
SG_BEGIN_DECL()
XBT_PUBLIC void* _sampi_malloc(size_t size);
+XBT_PUBLIC void* _sampi_calloc(size_t n_elm, size_t elm_size);
+XBT_PUBLIC void* _sampi_realloc(void *ptr, size_t size);
XBT_PUBLIC void _sampi_free(void* ptr);
AMPI_CALL(XBT_PUBLIC int, MPI_Iteration_in, (MPI_Comm comm))
XBT_PUBLIC void _sampi_free(void* ptr);
AMPI_CALL(XBT_PUBLIC int, MPI_Iteration_in, (MPI_Comm comm))