// Copyright (C) 1999-2003 Core Technologies. // // This file is part of tpasm. // // tpasm is free software; you can redistribute it and/or modify // it under the terms of the tpasm LICENSE AGREEMENT. // // tpasm is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // tpasm LICENSE AGREEMENT for more details. // // You should have received a copy of the tpasm LICENSE AGREEMENT // along with tpasm; see the file "LICENSE.TXT". // memory allocation routines #include "include.h" void DisposePtr(void *thePointer) // Free memory allocated by NewPtr { free(thePointer); numAllocatedPointers--; } void *NewPtr(int size) // allocate memory, keep track of the number of allocated pointers to // help track memory leaks { void *theResult; theResult=malloc(size); if(theResult) { numAllocatedPointers++; } return(theResult); }