~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/thr_malloc.cc

  • Committer: Monty Taylor
  • Date: 2008-12-10 02:09:33 UTC
  • mto: (670.1.3 devel)
  • mto: This revision was merged to the branch mainline in revision 672.
  • Revision ID: monty@inaugust.com-20081210020933-nh3biepurtx2nc7j
Moved pthread keys

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
/* Mallocs for used in threads */
18
18
 
19
19
#include <drizzled/server_includes.h>
 
20
#include <drizzled/current_session.h>
20
21
#include <drizzled/error.h>
21
22
 
 
23
 
22
24
extern "C" {
23
25
  void sql_alloc_error_handler(void)
24
26
  {
35
37
 
36
38
void *sql_alloc(size_t Size)
37
39
{
38
 
  MEM_ROOT *root= *(MEM_ROOT **)pthread_getspecific(THR_MALLOC);
 
40
  MEM_ROOT *root= current_mem_root();
39
41
  return alloc_root(root,Size);
40
42
}
41
43