def test_realloc(self):
        #verify that TCMalloc accounts for resizing correctly
        measurements = [TCMallocNative.getBytesUsed()]

        for ix in range(10):
            addr = TCMallocNative.mallocAndReturnAddress(10 * 1024 * 1024)
            addr = TCMallocNative.reallocAtAddress(addr, 20 * 1024 * 1024)
            measurements.append(TCMallocNative.getBytesUsed())
            addr = TCMallocNative.reallocAtAddress(addr, 10 * 1024 * 1024)
            addr = TCMallocNative.reallocAtAddress(addr, 5 * 1024 * 1024)
            TCMallocNative.freeAtAddress(addr)

            measurements.append(TCMallocNative.getBytesUsed())

        self.assertTrue(
            measurements[0] + 10 * 1024 * 1024 < measurements[-1],
            "Expected %s to be less than 10 MB larger than %s" % (measurements[-1], measurements[0])
            )
dataset/ETHPy150Open ufora/ufora/ufora/core/TCMalloc_test.py/ComponentModelTest.test_realloc/swapped operands of `<`