/*
* Copyright (C) 2000-2001 Marc Wandschneider <mw@kiltdown.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*
* For more information look at the file COPYRIGHT in this package
*
*/
/**
* This file contains our implementation of our debug new, and that's about
* it.
*/
#ifdef K_DEBUG
#include <sanity.h>
#include <lalloc.h>
/**
*=------------------------------------------------------------------------=
* operator new
*=------------------------------------------------------------------------=
* Does the equivalent of a new allocation, but uses our leak detecting
* memory allocator.
*
* Parameters:
* size_t amount of memory to alloacte.
* const char *filename from which this was allocated.
* int line number in said file at which this allocation was done
*
* Output:
* void * the new tracked memory.
*/
void * operator new(size_t size, const char *fileName, int lineNumber)
{
return localAllocImpl((char *)fileName, lineNumber, size);
}
#endif // K_DEBUG
syntax highlighted by Code2HTML, v. 0.9.1