1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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)
This commit is contained in:
jimw@mysql.com
2005-06-24 13:41:33 -07:00
parent 539d63d09a
commit 409592e652
17 changed files with 113 additions and 10 deletions

View File

@ -75,6 +75,8 @@ static int get_charset_number(const char *charset_name)
char *mdup(const char *src, uint len)
{
char *dst=(char*)malloc(len);
if (!dst)
exit(1);
memcpy(dst,src,len);
return dst;
}