~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/memory/root.h

  • Committer: lbieber
  • Date: 2010-10-01 13:06:31 UTC
  • mfrom: (1802.2.2 drizzle-bug-651948)
  • mto: This revision was merged to the branch mainline in revision 1805.
  • Revision ID: lbieber@orisndriz08-20101001130631-xubscnhmj7r5dn6g
Merge Andrew - Fix bug 651948 - Index lengths not retrieved using drizzledump

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/**
17
17
 * @file
18
18
 * @brief Memory root declarations
19
19
 */
20
20
 
21
 
 
22
 
 
23
21
#ifndef DRIZZLED_MEMORY_ROOT_H
24
22
#define DRIZZLED_MEMORY_ROOT_H
25
23
 
27
25
 
28
26
#include <drizzled/definitions.h>
29
27
 
30
 
#include "drizzled/visibility.h"
31
 
 
32
28
namespace drizzled
33
29
{
34
30
 
64
60
 
65
61
 
66
62
 
67
 
class DRIZZLED_API Root
 
63
class Root
68
64
{
69
65
public:
70
66
 
89
85
    error_handler= 0;
90
86
  }
91
87
 
92
 
  ~Root();
93
 
 
94
88
  /**
95
89
   * blocks with free memory in it 
96
90
   */
123
117
  void (*error_handler)(void);
124
118
  void reset_root_defaults(size_t block_size, size_t prealloc_size);
125
119
  void *alloc_root(size_t Size);
126
 
  inline void *allocate(size_t Size)
127
 
  {
128
 
    return alloc_root(Size);
129
 
  }
130
120
  void mark_blocks_free();
131
121
  void *memdup_root(const void *str, size_t len);
132
122
  char *strdup_root(const char *str);
133
 
 
134
123
  char *strmake_root(const char *str,size_t len);
135
124
  void init_alloc_root(size_t block_size= ROOT_MIN_BLOCK_SIZE);
136
125
 
137
 
  inline void *duplicate(const void *str, size_t len)
138
 
  {
139
 
    return memdup_root(str, len);
140
 
  }
141
 
 
142
126
  inline bool alloc_root_inited()
143
127
  {
144
128
    return min_malloc != 0;