def showMemoryTrace():
    try:
        import tracemalloc
    except ImportError:
        pass
    else:
        snapshot = tracemalloc.take_snapshot()
        stats = snapshot.statistics('lineno')
        printLine('Top 50 memory allocations:')
        for (count, stat) in enumerate(stats):
            if (count == 50):
                break
            printLine(stat)
def showMemoryTrace():
    try:
        import tracemalloc
    except ImportError:
        pass
    else:
        snapshot = tracemalloc.take_snapshot()
        stats = snapshot.statistics('lineno')
        printLine('Top 50 memory allocations:')
        for (count, stat) in enumerate(stats):
            if (count == 50):
                break
            printLine(stat)