diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-26 03:56:05 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-26 04:33:22 +0300 |
commit | 3961d3493be9c666850e71abe6102f72d3db9332 (patch) | |
tree | 83b903f8040f6384cbd4f702546db52a02bcd3dc /intern | |
parent | 3a7dc572dc9bbad35bdff3a3aeca8eab0ccb3fb7 (diff) |
Cleanup: use 'u' prefixed integer types for brevity in C code
This also simplifies using function style casts when moving to C++.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/guardedalloc/intern/mallocn_guarded_impl.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/intern/guardedalloc/intern/mallocn_guarded_impl.c b/intern/guardedalloc/intern/mallocn_guarded_impl.c index cd4b99ecde8..8deeb862b35 100644 --- a/intern/guardedalloc/intern/mallocn_guarded_impl.c +++ b/intern/guardedalloc/intern/mallocn_guarded_impl.c @@ -144,7 +144,7 @@ static const char *check_memlist(MemHead *memh); /* vars */ /* --------------------------------------------------------------------- */ -static unsigned int totblock = 0; +static uint totblock = 0; static size_t mem_in_use = 0, peak_mem = 0; static volatile struct localListBase _membase; @@ -453,7 +453,7 @@ void *MEM_guarded_mallocN(size_t len, const char *str) print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n", SIZET_ARG(len), str, - (unsigned int)mem_in_use); + (uint)mem_in_use); return NULL; } @@ -467,7 +467,7 @@ void *MEM_guarded_malloc_arrayN(size_t len, size_t size, const char *str) SIZET_ARG(len), SIZET_ARG(size), str, - (unsigned int)mem_in_use); + (uint)mem_in_use); abort(); return NULL; } @@ -526,7 +526,7 @@ void *MEM_guarded_mallocN_aligned(size_t len, size_t alignment, const char *str) print_error("aligned_malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n", SIZET_ARG(len), str, - (unsigned int)mem_in_use); + (uint)mem_in_use); return NULL; } @@ -550,7 +550,7 @@ void *MEM_guarded_callocN(size_t len, const char *str) print_error("Calloc returns null: len=" SIZET_FORMAT " in %s, total %u\n", SIZET_ARG(len), str, - (unsigned int)mem_in_use); + (uint)mem_in_use); return NULL; } @@ -564,7 +564,7 @@ void *MEM_guarded_calloc_arrayN(size_t len, size_t size, const char *str) SIZET_ARG(len), SIZET_ARG(size), str, - (unsigned int)mem_in_use); + (uint)mem_in_use); abort(); return NULL; } @@ -606,7 +606,7 @@ void MEM_guarded_printmemlist_stats(void) { MemHead *membl; MemPrintBlock *pb, *printblock; - unsigned int totpb, a, b; + uint totpb, a, b; size_t mem_in_use_slop = 0; mem_lock_thread(); @@ -1177,9 +1177,9 @@ size_t MEM_guarded_get_memory_in_use(void) return _mem_in_use; } -unsigned int MEM_guarded_get_memory_blocks_in_use(void) +uint MEM_guarded_get_memory_blocks_in_use(void) { - unsigned int _totblock; + uint _totblock; mem_lock_thread(); _totblock = totblock; |