File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -149,15 +149,7 @@ struct Table_cache_instance
149
149
}
150
150
151
151
static void *operator new [](size_t size)
152
- {
153
- void *res= aligned_malloc (size, CPU_LEVEL1_DCACHE_LINESIZE);
154
- if (res)
155
- {
156
- tc_allocated_size= size;
157
- update_malloc_size (size, 0 );
158
- }
159
- return res;
160
- }
152
+ { return aligned_malloc (size, CPU_LEVEL1_DCACHE_LINESIZE); }
161
153
static void operator delete[] (void *ptr) { aligned_free (ptr); }
162
154
static void mark_memory_freed ()
163
155
{
@@ -614,6 +606,8 @@ bool tdc_init(void)
614
606
/* Extra instance is allocated to avoid false sharing */
615
607
if (!(tc= new Table_cache_instance[tc_instances + 1 ]))
616
608
DBUG_RETURN (true );
609
+ tc_allocated_size= (tc_instances + 1 ) * sizeof *tc;
610
+ update_malloc_size (tc_allocated_size, 0 );
617
611
tdc_inited= true ;
618
612
mysql_mutex_init (key_LOCK_unused_shares, &LOCK_unused_shares,
619
613
MY_MUTEX_INIT_FAST);
You can’t perform that action at this time.
0 commit comments