Drizzled Public API Documentation

my_static.h
00001 /* Copyright (C) 2000 MySQL AB
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 /*
00017   Static variables for mysys library. All definied here for easy making of
00018   a shared library
00019 */
00020 
00021 #pragma once
00022 
00023 #include <signal.h>
00024 
00025 #define MAX_SIGNALS 10    /* Max signals under a dont-allow */
00026 #define MIN_KEYBLOCK  (min(IO_SIZE,1024))
00027 #define MAX_KEYBLOCK  8192    /* Max keyblocklength == 8*IO_SIZE */
00028 #define MAX_BLOCK_TYPES MAX_KEYBLOCK/MIN_KEYBLOCK
00029 
00030 namespace drizzled
00031 {
00032 namespace internal
00033 {
00034 
00035 /*
00036   Structure that stores information of a allocated memory block
00037   The data is at &struct_adr+sizeof(ALIGN_SIZE(sizeof(struct irem)))
00038   The lspecialvalue is at the previous 4 bytes from this, which may not
00039   necessarily be in the struct if the struct size isn't aligned at a 8 byte
00040   boundary.
00041 */
00042 
00043 class irem
00044 {
00045 public:
00046   irem *next;   /* Linked list of structures     */
00047   irem *prev;   /* Other link        */
00048   char *filename;   /* File in which memory was new'ed */
00049   uint32_t linenum;   /* Line number in above file     */
00050   uint32_t datasize;    /* Size requested      */
00051   uint32_t SpecialValue;    /* Underrun marker value     */
00052 
00053   irem():
00054     next(NULL),
00055   prev(NULL),
00056   filename(0),
00057   linenum(0),
00058   datasize(0),
00059   SpecialValue(0)
00060   {}
00061 };
00062 
00063 
00064 extern char curr_dir[FN_REFLEN], home_dir_buff[FN_REFLEN];
00065 
00066 extern volatile int _my_signals;
00067 
00068 extern unsigned char  *sf_min_adress,*sf_max_adress;
00069 extern uint sf_malloc_count;
00070 extern class irem *sf_malloc_root;
00071 
00072 extern uint64_t query_performance_frequency, query_performance_offset;
00073 
00074 extern sigset_t my_signals;   /* signals blocked by mf_brkhant */
00075 
00076 } /* namespace internal */
00077 } /* namespace drizzled */
00078