/* rbldnsdaccessor.c version 1.00 Copyright 2006, Michael Robinton, michael@bizsystems.com 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; either version 2 of the License, or (at your option) any later version. This program 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 GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "rbldnsdaccessor.h" /* add heap tracking for memory usage so that all memory can be released * by calling "rblf_mtfree". "istream.c" memory is ignored as it appears * to take care of itself dynamically */ #define MT_EXTEND 1024 * sizeof(void *) /* size of each subsequent memory tracking extension */ static void ** mtrack = NULL; static unsigned long mtend = 0; void rblf_mtrack(void * mem) { unsigned long i; void * newmt; if (mtrack == NULL) { mtrack = calloc(MT_EXTEND,sizeof(char *)); if (!mtrack) oom(); mtend = MT_EXTEND; } FIND_EMPTY_SLOT: for (i=0;i