title: Why doesn't my memory-profiler Memory usage changed?
body: <p>So I want to know the actual memory usage of my function. Can someone explain it why if the Memory usage does change and why if the Memory usage doesn't change?</p>
  
  <p>I've tried to follow this link : <a href="https://pypi.org/project/memory-profiler/" rel="nofollow noreferrer">https://pypi.org/project/memory-profiler/</a> and tried with the decorator.</p>
  
  <pre><code>import time
  import random
  from memory_profiler import profile
  
  @profile()
  def insertion():
      arr  = []
      for x in range(0,50):
          arr.append(random.randint(0,100))
      for i in range(1, len(arr)):
          key = arr[i]
          j = i-1
          while j &gt;=0 and key &lt; arr[j] :
                  arr[j+1] = arr[j]
                  arr[j] = key
                  j -= 1
      return arr
  
  print("Sorted :", insertion())
  </code></pre>
  
  <p>I expect the output for every line should be different, well not all, but at least there's an increment. While what I've got only constant Memory usage.</p>