~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/memory/root.cc

Separated BlitzCursor code out to it's own file.

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
61
61
  first_block_usage= 0;
62
62
}
63
63
 
64
 
memory::Root::~Root()
65
 
{
66
 
}
67
 
 
68
64
 
69
65
/**
70
66
 * @details
226
222
 * A pointer to the beginning of the allocated memory block in case of 
227
223
 * success or NULL if out of memory
228
224
 */
229
 
void *memory::Root::multi_alloc_root(int unused, ...)
 
225
void *memory::multi_alloc_root(memory::Root *root, ...)
230
226
{
231
227
  va_list args;
232
228
  char **ptr, *start, *res;
233
229
  size_t tot_length, length;
234
230
 
235
 
  (void)unused; // For some reason Sun Studio registers unused as not used.
236
 
  va_start(args, unused);
 
231
  va_start(args, root);
237
232
  tot_length= 0;
238
233
  while ((ptr= va_arg(args, char **)))
239
234
  {
242
237
  }
243
238
  va_end(args);
244
239
 
245
 
  if (!(start= (char*) this->alloc_root(tot_length)))
 
240
  if (!(start= (char*) root->alloc_root(tot_length)))
246
241
    return(0);
247
242
 
248
 
  va_start(args, unused);
 
243
  va_start(args, root);
249
244
  res= start;
250
245
  while ((ptr= va_arg(args, char **)))
251
246
  {