diff options
author | unknown <guilhem@gbichot4.local> | 2007-08-29 17:53:54 +0200 |
---|---|---|
committer | unknown <guilhem@gbichot4.local> | 2007-08-29 17:53:54 +0200 |
commit | b113fe7406413433bdaabbf92b1eeb051da82fce (patch) | |
tree | c7d9c18ce28970536a20d0aee5bbd95f632dcb54 /mysys | |
parent | 4201d2784945da87c4274eae1a5ea1b79f34ab12 (diff) | |
parent | e27890cab0a9155b38df57748af9d20dfcccb590 (diff) | |
download | mariadb-git-b113fe7406413433bdaabbf92b1eeb051da82fce.tar.gz |
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria
into gbichot4.local:/home/mysql_src/mysql-maria-for-undo-phase
storage/maria/ha_maria.cc:
Auto merged
storage/maria/ma_blockrec.c:
Auto merged
storage/maria/ma_loghandler.c:
Auto merged
storage/maria/ma_loghandler.h:
Auto merged
storage/maria/ma_loghandler_lsn.h:
Auto merged
storage/maria/maria_chk.c:
Auto merged
storage/maria/maria_read_log.c:
Auto merged
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_realloc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysys/my_realloc.c b/mysys/my_realloc.c index c7cf1323cd4..a55282e03a0 100644 --- a/mysys/my_realloc.c +++ b/mysys/my_realloc.c @@ -22,6 +22,16 @@ /* My memory re allocator */ +/** + @brief wrapper around realloc() + + @param oldpoint pointer to currently allocated area + @param size new size requested, must be >0 + @param my_flags flags + + @note if size==0 realloc() may return NULL; my_realloc() treats this as an + error which is not the intention of realloc() +*/ void* my_realloc(void* oldpoint, size_t size, myf my_flags) { void *point; @@ -29,6 +39,7 @@ void* my_realloc(void* oldpoint, size_t size, myf my_flags) DBUG_PRINT("my",("ptr: 0x%lx size: %lu my_flags: %d", (long) oldpoint, (ulong) size, my_flags)); + DBUG_ASSERT(size > 0); if (!oldpoint && (my_flags & MY_ALLOW_ZERO_PTR)) DBUG_RETURN(my_malloc(size,my_flags)); #ifdef USE_HALLOC |