You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: instrumentation.rb
    path of file: ./repos/gitlabhq/lib/gitlab/memory
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# This class uses a custom Ruby patch to allow
# a per-thread memory allocation tracking in a efficient manner
#
# This concept is currently tried to be upstreamed here:
# - https://githu
    
      def self.start_thread_memory_allocations
        return unless available?

        MUTEX.synchronize do
          # This method changes a global state
          Thread.trace_memory_allocations = true
        end

        # it will return `nil` if disabled
        Thread.current.memory_allocations
      end