aboutsummaryrefslogtreecommitdiff
path: root/include/gensvm_memory.h
diff options
context:
space:
mode:
authorGertjan van den Burg <burg@ese.eur.nl>2016-12-06 16:26:01 +0100
committerGertjan van den Burg <burg@ese.eur.nl>2016-12-06 16:26:01 +0100
commita1d164e6371eaf81a8aaf0be1e1a9b16a1af43fc (patch)
tree8fb1d9784d7903fe9e0f188440e52a35c2b0c644 /include/gensvm_memory.h
parentadd msvmmaj matlab file to git (diff)
downloadgensvm-a1d164e6371eaf81a8aaf0be1e1a9b16a1af43fc.tar.gz
gensvm-a1d164e6371eaf81a8aaf0be1e1a9b16a1af43fc.zip
document undocumented elements
Diffstat (limited to 'include/gensvm_memory.h')
-rw-r--r--include/gensvm_memory.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/gensvm_memory.h b/include/gensvm_memory.h
index 085fcec..e5982f6 100644
--- a/include/gensvm_memory.h
+++ b/include/gensvm_memory.h
@@ -32,12 +32,32 @@
#include <stddef.h>
+/**
+ * Wrapper macro for mycalloc(). This macro uses the __FILE__ and __LINE__
+ * standard macros to fill in some of the arguments to mycalloc(). This macro
+ * should be used when writing code, not mycalloc().
+ */
#define Calloc(type, size) \
mycalloc(__FILE__, __LINE__, size, sizeof(type))
+
+/**
+ * Wrapper macro for mymalloc(). This macro uses the __FILE__ and __LINE__
+ * standard macros to fill in some of the arguments to mymalloc(). This macro
+ * should be used when writing code, not mymalloc().
+ */
#define Malloc(type, size) \
mymalloc(__FILE__, __LINE__, (size)*sizeof(type))
+/**
+ * Wrapper macro for myrealloc(). This macro uses the __FILE__ and __LINE__
+ * standard macros to fill in some of the arguments to myrealloc(). This macro
+ * should be used when writing code, not myrealloc().
+ */
#define Realloc(var, type, size) \
myrealloc(__FILE__, __LINE__, (size)*sizeof(type), var)
+/**
+ * Wrapper macro for memset(). Since memset is only used to zero a matrix,
+ * this macro is defined.
+ */
#define Memset(var, type, size) \
memset(var, 0, (size)*sizeof(type))