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

Function update_global_memory_status

sql/sql_class.h:1183–1191  ·  view source on GitHub ↗

Update global_memory_used. We have to do this with atomic_add as the global value can change outside of LOCK_status. */

Source from the content-addressed store, hash-verified

1181 global value can change outside of LOCK_status.
1182*/
1183static inline void update_global_memory_status(int64 size)
1184{
1185 DBUG_PRINT("info", ("global memory_used: %lld size: %lld",
1186 (longlong) global_status_var.global_memory_used,
1187 size));
1188 // workaround for gcc 4.2.4-1ubuntu4 -fPIE (from DEB_BUILD_HARDENING=1)
1189 int64 volatile * volatile ptr= &global_status_var.global_memory_used;
1190 my_atomic_add64_explicit(ptr, size, MY_MEMORY_ORDER_RELAXED);
1191}
1192
1193
1194static inline bool is_supported_parser_charset(CHARSET_INFO *cs)

Callers 3

my_malloc_size_cb_funcFunction · 0.85
~THDMethod · 0.85
add_to_statusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected