My Project
thr_malloc.h
00001 /* Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
00002 
00003    This program is free software; you can redistribute it and/or modify
00004    it under the terms of the GNU General Public License as published by
00005    the Free Software Foundation; version 2 of the License.
00006 
00007    This program is distributed in the hope that it will be useful,
00008    but WITHOUT ANY WARRANTY; without even the implied warranty of
00009    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010    GNU General Public License for more details.
00011 
00012    You should have received a copy of the GNU General Public License
00013    along with this program; if not, write to the Free Software
00014    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
00015 
00016 #ifndef THR_MALLOC_INCLUDED
00017 #define THR_MALLOC_INCLUDED
00018 
00019 #include "my_global.h"                          // uint, size_t
00020 
00021 typedef struct charset_info_st CHARSET_INFO;
00022 typedef struct st_mem_root MEM_ROOT;
00023 
00024 void init_sql_alloc(MEM_ROOT *root, uint block_size, uint pre_alloc_size);
00025 void *sql_alloc(size_t);
00026 void *sql_calloc(size_t);
00027 char *sql_strdup(const char *str);
00028 char *sql_strmake(const char *str, size_t len);
00029 void *sql_memdup(const void * ptr, size_t size);
00030 char *sql_strmake_with_convert(const char *str, size_t arg_length,
00031                                const CHARSET_INFO *from_cs,
00032                                size_t max_res_length,
00033                                const CHARSET_INFO *to_cs, size_t *result_length);
00034 
00035 #endif /* THR_MALLOC_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines