~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/memory/root.h

  • Committer: patrick crews
  • Date: 2011-02-23 17:17:25 UTC
  • mto: (2195.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2196.
  • Revision ID: gleebix@gmail.com-20110223171725-4tgewemxhsw1m7q8
Integrated randgen with dbqp.  We now have mode=randgen and a set of randgen test suites (very basic now).  Output = same as dtr : )  We also have mode=cleanup to kill any servers we have started.  Docs updates too.  Gendata utility allows us to populate test servers 

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * @brief Memory root declarations
19
19
 */
20
20
 
 
21
 
 
22
 
21
23
#ifndef DRIZZLED_MEMORY_ROOT_H
22
24
#define DRIZZLED_MEMORY_ROOT_H
23
25
 
25
27
 
26
28
#include <drizzled/definitions.h>
27
29
 
 
30
#include <drizzled/visibility.h>
 
31
 
28
32
namespace drizzled
29
33
{
30
34
 
60
64
 
61
65
 
62
66
 
63
 
class Root
 
67
class DRIZZLED_API Root
64
68
{
65
69
public:
66
70
 
119
123
  void (*error_handler)(void);
120
124
  void reset_root_defaults(size_t block_size, size_t prealloc_size);
121
125
  void *alloc_root(size_t Size);
 
126
  inline void *allocate(size_t Size)
 
127
  {
 
128
    return alloc_root(Size);
 
129
  }
122
130
  void mark_blocks_free();
123
131
  void *memdup_root(const void *str, size_t len);
124
132
  char *strdup_root(const char *str);
 
133
 
125
134
  char *strmake_root(const char *str,size_t len);
126
135
  void init_alloc_root(size_t block_size= ROOT_MIN_BLOCK_SIZE);
127
136
 
 
137
  inline void *duplicate(const void *str, size_t len)
 
138
  {
 
139
    return memdup_root(str, len);
 
140
  }
 
141
 
128
142
  inline bool alloc_root_inited()
129
143
  {
130
144
    return min_malloc != 0;