MCPcopy Create free account
hub / github.com/MariaDB/server / init_socket_class

Function init_socket_class

storage/perfschema/pfs_instr_class.cc:898–918  ·  view source on GitHub ↗

Initialize the socket class buffer. @param socket_class_sizing max number of socket class @return 0 on success */

Source from the content-addressed store, hash-verified

896 @return 0 on success
897*/
898int init_socket_class(uint socket_class_sizing)
899{
900 int result= 0;
901 socket_class_dirty_count= socket_class_allocated_count= 0;
902 socket_class_max= socket_class_sizing;
903 socket_class_lost= 0;
904
905 if (socket_class_max > 0)
906 {
907 socket_class_array= PFS_MALLOC_ARRAY(& builtin_memory_socket_class,
908 socket_class_max,
909 sizeof(PFS_socket_class), PFS_socket_class,
910 MYF(MY_ZEROFILL));
911 if (unlikely(socket_class_array == NULL))
912 return 1;
913 }
914 else
915 socket_class_array= NULL;
916
917 return result;
918}
919
920/** Cleanup the socket class buffers. */
921void cleanup_socket_class(void)

Callers 7

test_oomFunction · 0.85
test_no_registrationFunction · 0.85
test_socket_registrationFunction · 0.85
test_instruments_resetFunction · 0.85

Calls

no outgoing calls

Tested by 4

test_oomFunction · 0.68
test_no_registrationFunction · 0.68
test_socket_registrationFunction · 0.68
test_instruments_resetFunction · 0.68