Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-05-01 13:50:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-01 14:00:56 +0300
commit177a0ca131794a15d775577e4fa25c1d9e695d13 (patch)
tree34ec644675a418b232d995921aedcfc9f2cd92a2 /intern/guardedalloc
parent5bbf9029ce676e69042e0a26075431ce67357c38 (diff)
Cleanup: comments (long lines) in various intern/ libs
Diffstat (limited to 'intern/guardedalloc')
-rw-r--r--intern/guardedalloc/MEM_guardedalloc.h82
-rw-r--r--intern/guardedalloc/intern/mallocn_guarded_impl.c4
-rw-r--r--intern/guardedalloc/intern/mmap_win.c2
-rw-r--r--intern/guardedalloc/test/simpletest/memtest.c2
4 files changed, 45 insertions, 45 deletions
diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h
index b5ac3288a61..b1a0eda0e22 100644
--- a/intern/guardedalloc/MEM_guardedalloc.h
+++ b/intern/guardedalloc/MEM_guardedalloc.h
@@ -60,13 +60,13 @@ extern "C" {
#endif
/** Returns the length of the allocated memory segment pointed at
- * by vmemh. If the pointer was not previously allocated by this
- * module, the result is undefined.*/
+ * by vmemh. If the pointer was not previously allocated by this
+ * module, the result is undefined.*/
extern size_t (*MEM_allocN_len)(const void *vmemh) ATTR_WARN_UNUSED_RESULT;
/**
- * Release memory previously allocated by this module.
- */
+ * Release memory previously allocated by this module.
+ */
extern void (*MEM_freeN)(void *vmemh);
#if 0 /* UNUSED */
@@ -77,23 +77,23 @@ extern short (*MEM_testN)(void *vmemh);
#endif
/**
- * Duplicates a block of memory, and returns a pointer to the
- * newly allocated block. */
+ * Duplicates a block of memory, and returns a pointer to the
+ * newly allocated block. */
extern void *(*MEM_dupallocN)(const void *vmemh) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT;
/**
- * Reallocates a block of memory, and returns pointer to the newly
- * allocated block, the old one is freed. this is not as optimized
- * as a system realloc but just makes a new allocation and copies
- * over from existing memory. */
+ * Reallocates a block of memory, and returns pointer to the newly
+ * allocated block, the old one is freed. this is not as optimized
+ * as a system realloc but just makes a new allocation and copies
+ * over from existing memory. */
extern void *(*MEM_reallocN_id)(void *vmemh,
size_t len,
const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
ATTR_ALLOC_SIZE(2);
/**
- * A variant of realloc which zeros new bytes
- */
+ * A variant of realloc which zeros new bytes
+ */
extern void *(*MEM_recallocN_id)(void *vmemh,
size_t len,
const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
@@ -103,62 +103,62 @@ extern void *(*MEM_recallocN_id)(void *vmemh,
#define MEM_recallocN(vmemh, len) MEM_recallocN_id(vmemh, len, __func__)
/**
- * Allocate a block of memory of size len, with tag name str. The
- * memory is cleared. The name must be static, because only a
- * pointer to it is stored ! */
+ * Allocate a block of memory of size len, with tag name str. The
+ * memory is cleared. The name must be static, because only a
+ * pointer to it is stored ! */
extern void *(*MEM_callocN)(size_t len, const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
/**
- * Allocate a block of memory of size (len * size), with tag name
- * str, aborting in case of integer overflows to prevent vulnerabilities.
- * The memory is cleared. The name must be static, because only a
- * pointer to it is stored ! */
+ * Allocate a block of memory of size (len * size), with tag name
+ * str, aborting in case of integer overflows to prevent vulnerabilities.
+ * The memory is cleared. The name must be static, because only a
+ * pointer to it is stored ! */
extern void *(*MEM_calloc_arrayN)(size_t len,
size_t size,
const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
ATTR_ALLOC_SIZE(1, 2) ATTR_NONNULL(3);
/**
- * Allocate a block of memory of size len, with tag name str. The
- * name must be a static, because only a pointer to it is stored !
- * */
+ * Allocate a block of memory of size len, with tag name str. The
+ * name must be a static, because only a pointer to it is stored !
+ * */
extern void *(*MEM_mallocN)(size_t len, const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
/**
- * Allocate a block of memory of size (len * size), with tag name str,
- * aborting in case of integer overflow to prevent vulnerabilities. The
- * name must be a static, because only a pointer to it is stored !
- * */
+ * Allocate a block of memory of size (len * size), with tag name str,
+ * aborting in case of integer overflow to prevent vulnerabilities. The
+ * name must be a static, because only a pointer to it is stored !
+ * */
extern void *(*MEM_malloc_arrayN)(size_t len,
size_t size,
const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
ATTR_ALLOC_SIZE(1, 2) ATTR_NONNULL(3);
/**
- * Allocate an aligned block of memory of size len, with tag name str. The
- * name must be a static, because only a pointer to it is stored !
- * */
+ * Allocate an aligned block of memory of size len, with tag name str. The
+ * name must be a static, because only a pointer to it is stored !
+ * */
extern void *(*MEM_mallocN_aligned)(size_t len,
size_t alignment,
const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
ATTR_ALLOC_SIZE(1) ATTR_NONNULL(3);
/**
- * Same as callocN, clears memory and uses mmap (disk cached) if supported.
- * Can be free'd with MEM_freeN as usual.
- * */
+ * Same as callocN, clears memory and uses mmap (disk cached) if supported.
+ * Can be free'd with MEM_freeN as usual.
+ * */
extern void *(*MEM_mapallocN)(size_t len,
const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
/** Print a list of the names and sizes of all allocated memory
- * blocks. as a python dict for easy investigation */
+ * blocks. as a python dict for easy investigation */
extern void (*MEM_printmemlist_pydict)(void);
/** Print a list of the names and sizes of all allocated memory
- * blocks. */
+ * blocks. */
extern void (*MEM_printmemlist)(void);
/** calls the function on all allocated memory blocks. */
@@ -171,22 +171,22 @@ extern void (*MEM_printmemlist_stats)(void);
extern void (*MEM_set_error_callback)(void (*func)(const char *));
/**
- * Are the start/end block markers still correct ?
- *
- * @retval true for correct memory, false for corrupted memory. */
+ * Are the start/end block markers still correct ?
+ *
+ * @retval true for correct memory, false for corrupted memory. */
extern bool (*MEM_consistency_check)(void);
/** Set thread locking functions for safe memory allocation from multiple
- * threads, pass NULL pointers to disable thread locking again. */
+ * threads, pass NULL pointers to disable thread locking again. */
extern void (*MEM_set_lock_callback)(void (*lock)(void), void (*unlock)(void));
/** Attempt to enforce OSX (or other OS's) to have malloc and stack nonzero */
extern void (*MEM_set_memory_debug)(void);
/**
- * Memory usage stats
- * - MEM_get_memory_in_use is all memory
- * - MEM_get_mapped_memory_in_use is a subset of all memory */
+ * Memory usage stats
+ * - MEM_get_memory_in_use is all memory
+ * - MEM_get_mapped_memory_in_use is a subset of all memory */
extern size_t (*MEM_get_memory_in_use)(void);
/** Get mapped memory usage. */
extern size_t (*MEM_get_mapped_memory_in_use)(void);
diff --git a/intern/guardedalloc/intern/mallocn_guarded_impl.c b/intern/guardedalloc/intern/mallocn_guarded_impl.c
index 384cba113ff..8ba14b3887b 100644
--- a/intern/guardedalloc/intern/mallocn_guarded_impl.c
+++ b/intern/guardedalloc/intern/mallocn_guarded_impl.c
@@ -106,8 +106,8 @@ typedef struct MemHead {
int tag2;
short mmap; /* if true, memory was mmapped */
short alignment; /* if non-zero aligned alloc was used
- * and alignment is stored here.
- */
+ * and alignment is stored here.
+ */
#ifdef DEBUG_MEMCOUNTER
int _count;
#endif
diff --git a/intern/guardedalloc/intern/mmap_win.c b/intern/guardedalloc/intern/mmap_win.c
index 331d67aa55a..5b0c4b6614a 100644
--- a/intern/guardedalloc/intern/mmap_win.c
+++ b/intern/guardedalloc/intern/mmap_win.c
@@ -32,7 +32,7 @@
# include "mmap_win.h"
# ifndef FILE_MAP_EXECUTE
-//not defined in earlier versions of the Platform SDK (before February 2003)
+// not defined in earlier versions of the Platform SDK (before February 2003)
# define FILE_MAP_EXECUTE 0x0020
# endif
diff --git a/intern/guardedalloc/test/simpletest/memtest.c b/intern/guardedalloc/test/simpletest/memtest.c
index 576e502b72e..8acced088f6 100644
--- a/intern/guardedalloc/test/simpletest/memtest.c
+++ b/intern/guardedalloc/test/simpletest/memtest.c
@@ -23,7 +23,7 @@
*/
/* To compile run:
- * gcc -DWITH_GUARDEDALLOC -I../../ -I../../../atomic/ memtest.c ../../intern/mallocn.c -o simpletest
+ * gcc -DWITH_GUARDEDALLOC -I../../ -I../../../atomic/ memtest.c ../../intern/mallocn.c -o memtest
*/
/* Number of chunks to test with */