diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-03 21:53:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-03 21:53:41 +0400 |
commit | 2a8d76d7342b0064284075bb5b88d964eda32e87 (patch) | |
tree | 80ddb787fb51929ab80b9863710cb1a19ce27cb9 /intern/guardedalloc/MEM_guardedalloc.h | |
parent | 5f72462e38e940a0e1e03ee682d159c1aabbc309 (diff) |
add versions of MEM_reallocN, MEM_recallocN which take a string arg so new allocs have an ID, changing existing functions signatures would be too disruptive at the moment.
Diffstat (limited to 'intern/guardedalloc/MEM_guardedalloc.h')
-rw-r--r-- | intern/guardedalloc/MEM_guardedalloc.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h index d49dc4b4dd9..764340beb71 100644 --- a/intern/guardedalloc/MEM_guardedalloc.h +++ b/intern/guardedalloc/MEM_guardedalloc.h @@ -102,6 +102,19 @@ extern "C" { #endif ; + void *MEM_reallocN_id(void *vmemh, size_t len, const char *str) +#if MEM_GNU_ATTRIBUTES + __attribute__((warn_unused_result)) + __attribute__((alloc_size(2))) +#endif + ; + void *MEM_recallocN_id(void *vmemh, size_t len, const char *str) +#if MEM_GNU_ATTRIBUTES + __attribute__((warn_unused_result)) + __attribute__((alloc_size(2))) +#endif + ; + /** * Reallocates a block of memory, and returns pointer to the newly * allocated block, the old one is freed. this is not as optimized |