~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/memory/root.h

  • Committer: kalebral at gmail
  • Date: 2010-12-04 04:58:08 UTC
  • mto: (1971.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1972.
  • Revision ID: kalebral@gmail.com-20101204045808-acto22oxfg43m02e
a few more updates of files that did not have license or had incorrect license structure

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
123
119
  void (*error_handler)(void);
124
120
  void reset_root_defaults(size_t block_size, size_t prealloc_size);
125
121
  void *alloc_root(size_t Size);
126
 
  inline void *allocate(size_t Size)
127
 
  {
128
 
    return alloc_root(Size);
129
 
  }
130
122
  void mark_blocks_free();
131
123
  void *memdup_root(const void *str, size_t len);
132
124
  char *strdup_root(const char *str);
133
 
 
134
125
  char *strmake_root(const char *str,size_t len);
135
126
  void init_alloc_root(size_t block_size= ROOT_MIN_BLOCK_SIZE);
136
127
 
137
 
  inline void *duplicate(const void *str, size_t len)
138
 
  {
139
 
    return memdup_root(str, len);
140
 
  }
141
 
 
142
128
  inline bool alloc_root_inited()
143
129
  {
144
130
    return min_malloc != 0;