void MemoryLeakDetector::checkForCorruption(MemoryLeakDetectorNode* node, const char* file, int line, TestMemoryAllocator* allocator, bool allocateNodesSeperately)
{
    if (!matchingAllocation(node->allocator_, allocator))
        outputBuffer_.reportAllocationDeallocationMismatchFailure(node, file, line, allocator, reporter_);
    else if (!validMemoryCorruptionInformation(node->memory_ + node->size_))
        outputBuffer_.reportMemoryCorruptionFailure(node, file, line, allocator, reporter_);
    else if (allocateNodesSeperately)
        allocator->freeMemoryLeakNode((char*) node);
}
void MemoryLeakDetector::checkForCorruption(MemoryLeakDetectorNode* node, const char* file, int line, TestMemoryAllocator* allocator, bool allocateNodesSeperately)
{
	if (!matchingAllocation(node->allocator_, allocator)) reportFailure(MEM_LEAK_ALLOC_DEALLOC_MISMATCH, node->file_, node->line_, node->size_, node->allocator_, file, line, allocator);
	else if (!validMemoryCorruptionInformation(node->memory_ + node->size_)) reportFailure(MEM_LEAK_MEMORY_CORRUPTION, node->file_, node->line_, node->size_, node->allocator_, file, line, allocator);
	else if (allocateNodesSeperately) allocator->freeMemoryLeakNode((char*) node);
}