-
Bin Su authored
So far the the real constructor for rw_lock_t has been rw_lock_create() and the corresponding destructor has been rw_lock_free(). Code should not call new or delete when creating rw_lock_t instances but use malloc()/free or some generic mechanism to allocate the memory. They should not be created on the stack either. We have three cases where we create rw_lock_t instances in the data segment. buf/buf0buf.cc:static rw_lock_t buf_chunk_map_latch; dict/dict0dict.cc:rw_lock_t dict_operation_lock; trx/trx0i_s.cc:rw_lock_t in trx_i_s_cache; Original patch was provided by Sunny Bains. RB: 9271 Reviewed-by:
Jimmy <Yang<jimmy.yang@oracle.com>
Bin Su authoredSo far the the real constructor for rw_lock_t has been rw_lock_create() and the corresponding destructor has been rw_lock_free(). Code should not call new or delete when creating rw_lock_t instances but use malloc()/free or some generic mechanism to allocate the memory. They should not be created on the stack either. We have three cases where we create rw_lock_t instances in the data segment. buf/buf0buf.cc:static rw_lock_t buf_chunk_map_latch; dict/dict0dict.cc:rw_lock_t dict_operation_lock; trx/trx0i_s.cc:rw_lock_t in trx_i_s_cache; Original patch was provided by Sunny Bains. RB: 9271 Reviewed-by:
Jimmy <Yang<jimmy.yang@oracle.com>
Loading