diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-01-29 13:50:26 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-03-10 19:24:22 +0100 |
commit | 7c58e97bf6f80a251046c5b3e7bce826fe058bd6 (patch) | |
tree | 7d32d26b320cf83296ee0ede2ea164ad116c4de8 /storage/archive | |
parent | 2ac3121af2767186c489054db5d4871d04b8eef4 (diff) | |
download | mariadb-git-7c58e97bf6f80a251046c5b3e7bce826fe058bd6.tar.gz |
perfschema memory related instrumentation changes
Diffstat (limited to 'storage/archive')
-rw-r--r-- | storage/archive/ha_archive.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc index 0b352589fe3..259093d0f05 100644 --- a/storage/archive/ha_archive.cc +++ b/storage/archive/ha_archive.cc @@ -278,7 +278,7 @@ int archive_discover(handlerton *hton, THD* thd, TABLE_SHARE *share) if (frm_stream.frm_length == 0) DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE); - frm_ptr= (uchar *)my_malloc(sizeof(char) * frm_stream.frm_length, + frm_ptr= (uchar *)my_malloc(PSI_INSTRUMENT_ME, frm_stream.frm_length, MYF(MY_THREAD_SPECIFIC | MY_WME)); if (!frm_ptr) DBUG_RETURN(HA_ERR_OUT_OF_MEM); @@ -705,7 +705,7 @@ int ha_archive::frm_copy(azio_stream *src, azio_stream *dst) return 0; } - if (!(frm_ptr= (uchar *) my_malloc(src->frm_length, + if (!(frm_ptr= (uchar *) my_malloc(PSI_INSTRUMENT_ME, src->frm_length, MYF(MY_THREAD_SPECIFIC | MY_WME)))) return HA_ERR_OUT_OF_MEM; @@ -1214,8 +1214,8 @@ bool ha_archive::fix_rec_buff(unsigned int length) if (length > record_buffer->length) { uchar *newptr; - if (!(newptr=(uchar*) my_realloc((uchar*) record_buffer->buffer, - length, + if (!(newptr=(uchar*) my_realloc(PSI_INSTRUMENT_ME, + (uchar*) record_buffer->buffer, length, MYF(MY_ALLOW_ZERO_PTR)))) DBUG_RETURN(1); record_buffer->buffer= newptr; @@ -1889,16 +1889,14 @@ archive_record_buffer *ha_archive::create_record_buffer(unsigned int length) { DBUG_ENTER("ha_archive::create_record_buffer"); archive_record_buffer *r; - if (!(r= - (archive_record_buffer*) my_malloc(sizeof(archive_record_buffer), - MYF(MY_WME)))) + if (!(r= (archive_record_buffer*) my_malloc(PSI_INSTRUMENT_ME, + sizeof(archive_record_buffer), MYF(MY_WME)))) { DBUG_RETURN(NULL); /* purecov: inspected */ } r->length= (int)length; - if (!(r->buffer= (uchar*) my_malloc(r->length, - MYF(MY_WME)))) + if (!(r->buffer= (uchar*) my_malloc(PSI_INSTRUMENT_ME, r->length, MYF(MY_WME)))) { my_free(r); DBUG_RETURN(NULL); /* purecov: inspected */ |