/* * Copyright (C) 2000-2001 Marc Wandschneider * * 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 #include /** *=------------------------------------------------------------------------= * 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