diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/guardedalloc/MEM_guardedalloc.h | 4 | ||||
-rw-r--r-- | intern/guardedalloc/intern/mallocn.c | 4 | ||||
-rw-r--r-- | intern/guardedalloc/intern/mallocn_guarded_impl.c | 4 | ||||
-rw-r--r-- | intern/guardedalloc/intern/mallocn_intern.h | 4 | ||||
-rw-r--r-- | intern/guardedalloc/intern/mallocn_lockfree_impl.c | 2 | ||||
-rw-r--r-- | intern/guardedalloc/test/simpletest/memtest.c | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h index a57921223e2..65650209711 100644 --- a/intern/guardedalloc/MEM_guardedalloc.h +++ b/intern/guardedalloc/MEM_guardedalloc.h @@ -165,8 +165,8 @@ extern "C" { /** * Are the start/end block markers still correct ? * - * @retval 0 for correct memory, 1 for corrupted memory. */ - extern bool (*MEM_check_memory_integrity)(void); + * @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. */ diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c index b973037358b..a95cc9163c4 100644 --- a/intern/guardedalloc/intern/mallocn.c +++ b/intern/guardedalloc/intern/mallocn.c @@ -53,7 +53,7 @@ void (*MEM_printmemlist)(void) = MEM_lockfree_printmemlist; void (*MEM_callbackmemlist)(void (*func)(void *)) = MEM_lockfree_callbackmemlist; void (*MEM_printmemlist_stats)(void) = MEM_lockfree_printmemlist_stats; void (*MEM_set_error_callback)(void (*func)(const char *)) = MEM_lockfree_set_error_callback; -bool (*MEM_check_memory_integrity)(void) = MEM_lockfree_check_memory_integrity; +bool (*MEM_consistency_check)(void) = MEM_lockfree_consistency_check; void (*MEM_set_lock_callback)(void (*lock)(void), void (*unlock)(void)) = MEM_lockfree_set_lock_callback; void (*MEM_set_memory_debug)(void) = MEM_lockfree_set_memory_debug; size_t (*MEM_get_memory_in_use)(void) = MEM_lockfree_get_memory_in_use; @@ -119,7 +119,7 @@ void MEM_use_guarded_allocator(void) MEM_callbackmemlist = MEM_guarded_callbackmemlist; MEM_printmemlist_stats = MEM_guarded_printmemlist_stats; MEM_set_error_callback = MEM_guarded_set_error_callback; - MEM_check_memory_integrity = MEM_guarded_check_memory_integrity; + MEM_consistency_check = MEM_guarded_consistency_check; MEM_set_lock_callback = MEM_guarded_set_lock_callback; MEM_set_memory_debug = MEM_guarded_set_memory_debug; MEM_get_memory_in_use = MEM_guarded_get_memory_in_use; diff --git a/intern/guardedalloc/intern/mallocn_guarded_impl.c b/intern/guardedalloc/intern/mallocn_guarded_impl.c index d012cce5334..d09f1b83ad4 100644 --- a/intern/guardedalloc/intern/mallocn_guarded_impl.c +++ b/intern/guardedalloc/intern/mallocn_guarded_impl.c @@ -282,7 +282,7 @@ static void mem_unlock_thread(void) thread_unlock_callback(); } -bool MEM_guarded_check_memory_integrity(void) +bool MEM_guarded_consistency_check(void) { const char *err_val = NULL; MemHead *listend; @@ -292,7 +292,7 @@ bool MEM_guarded_check_memory_integrity(void) err_val = check_memlist(listend); - return (err_val != NULL); + return (err_val == NULL); } diff --git a/intern/guardedalloc/intern/mallocn_intern.h b/intern/guardedalloc/intern/mallocn_intern.h index 4b2282ae9ad..754a79f08b5 100644 --- a/intern/guardedalloc/intern/mallocn_intern.h +++ b/intern/guardedalloc/intern/mallocn_intern.h @@ -137,7 +137,7 @@ void MEM_lockfree_printmemlist(void); void MEM_lockfree_callbackmemlist(void (*func)(void *)); void MEM_lockfree_printmemlist_stats(void); void MEM_lockfree_set_error_callback(void (*func)(const char *)); -bool MEM_lockfree_check_memory_integrity(void); +bool MEM_lockfree_consistency_check(void); void MEM_lockfree_set_lock_callback(void (*lock)(void), void (*unlock)(void)); void MEM_lockfree_set_memory_debug(void); size_t MEM_lockfree_get_memory_in_use(void); @@ -166,7 +166,7 @@ void MEM_guarded_printmemlist(void); void MEM_guarded_callbackmemlist(void (*func)(void *)); void MEM_guarded_printmemlist_stats(void); void MEM_guarded_set_error_callback(void (*func)(const char *)); -bool MEM_guarded_check_memory_integrity(void); +bool MEM_guarded_consistency_check(void); void MEM_guarded_set_lock_callback(void (*lock)(void), void (*unlock)(void)); void MEM_guarded_set_memory_debug(void); size_t MEM_guarded_get_memory_in_use(void); diff --git a/intern/guardedalloc/intern/mallocn_lockfree_impl.c b/intern/guardedalloc/intern/mallocn_lockfree_impl.c index 2899a37a1b2..4c6ba0cb256 100644 --- a/intern/guardedalloc/intern/mallocn_lockfree_impl.c +++ b/intern/guardedalloc/intern/mallocn_lockfree_impl.c @@ -469,7 +469,7 @@ void MEM_lockfree_set_error_callback(void (*func)(const char *)) error_callback = func; } -bool MEM_lockfree_check_memory_integrity(void) +bool MEM_lockfree_consistency_check(void) { return true; } diff --git a/intern/guardedalloc/test/simpletest/memtest.c b/intern/guardedalloc/test/simpletest/memtest.c index 79d55dd02cc..d306337d0ab 100644 --- a/intern/guardedalloc/test/simpletest/memtest.c +++ b/intern/guardedalloc/test/simpletest/memtest.c @@ -90,7 +90,7 @@ int main(int argc, char *argv[]) if (verbose > 1) MEM_printmemlist(); /* memory is there: test it */ - error_status = MEM_check_memory_integrity(); + error_status = MEM_consistency_check(); if (verbose) { if (error_status) { @@ -125,7 +125,7 @@ int main(int argc, char *argv[]) ip = (int*) p[6]; *(ip+10005) = 0; - retval = MEM_check_memory_integrity(); + retval = MEM_consistency_check(); /* the test should have failed */ error_status |= !retval; |