diff options
author | jimw@mysql.com <> | 2005-06-24 13:41:33 -0700 |
---|---|---|
committer | jimw@mysql.com <> | 2005-06-24 13:41:33 -0700 |
commit | 409592e6529828283ee4867ee743db1b4b4c15a7 (patch) | |
tree | f29e416cf6a91425d2edb7c5e7cca1dde42543f6 /include/m_string.h | |
parent | 539d63d09afc91b3286611bee8991d5f257fc226 (diff) | |
download | mariadb-git-409592e6529828283ee4867ee743db1b4b4c15a7.tar.gz |
Add my_str_malloc and _free function pointers to strings library
which will by default exit(1) if malloc() fails, but can be set
to do something else by the calling program does, which mysqld
does to use my_malloc(..., MYF(MY_FAE)) instead. Also checks
allocation in conf_to_src utility program. (Bug #7003)
Diffstat (limited to 'include/m_string.h')
-rw-r--r-- | include/m_string.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/m_string.h b/include/m_string.h index d3465363beb..33ba9c155c2 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -88,6 +88,13 @@ extern "C" { #endif +/* + my_str_malloc() and my_str_free() are assigned to implementations in + strings/alloc.c, but can be overridden in the calling program. + */ +extern void *(*my_str_malloc)(size_t); +extern void (*my_str_free)(void *); + #if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread) #define strmov(A,B) stpcpy((A),(B)) #ifndef stpcpy |