2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 13:08:06 +00:00

289 Commits

Author SHA1 Message Date
Andreas Gustafsson
449f4411c9 NO NEED TO SHOUT 2001-02-14 23:05:14 +00:00
Brian Wellington
47d78f67cb Give more information when isc_mempool_destroy() dies with an assertion
failure, in the hope that we'll be able to fix the bug one day.
2001-02-13 20:29:27 +00:00
Mark Andrews
ba6e506ed2 #if not #ifdef ISC_MEM_TRACKLINES 2001-02-13 13:20:37 +00:00
Mark Andrews
b499a7c511 Print out the active memory prior to INSIST/REQUIRE failures. 2001-02-13 06:21:32 +00:00
Brian Wellington
9f708f9014 isc_mem_stats() should print memory statistics even when there are no
allocated blocks at the time it's called.
2001-02-13 01:07:54 +00:00
Andreas Gustafsson
50179a15d1 UNUSED() 2001-02-09 19:08:11 +00:00
Andreas Gustafsson
dd0ef1a9d3 removed the unused and undocumented functions
isc_mem_preallocate(), isc_mem_valid(), isc_mem_setsplit(), and
isc_mem_restore()
2001-02-09 19:05:23 +00:00
Andreas Gustafsson
c674a8d5e7 documented the isc_mem_* interface 2001-02-09 18:51:20 +00:00
Brian Wellington
770d3b36da ctx->checkfree was only being initialized if USE_INTERNAL_MALLOC was on. 2001-02-05 23:48:25 +00:00
Damien Neil
3c31899857 Fix warning in the overrun detection code. 2001-01-25 01:38:01 +00:00
Damien Neil
823eed5ea9 Made the internal malloc() optional, selected by the
ISC_MEM_USE_INTERNAL_MALLOC preprocessor constant.
2001-01-25 01:18:00 +00:00
Brian Wellington
499b34cea0 copyright update 2001-01-09 22:01:04 +00:00
Mark Andrews
6976801867 Replace memset() w/ null assignment to last element of array.
the strncpy() fills in the other bytes.
2001-01-09 00:39:46 +00:00
Brian Wellington
8e047d3b74 microoptimizations to make quantize/rmsize more efficient. 2000-12-29 01:02:07 +00:00
Andreas Gustafsson
4c1fee4236 don't turn on ISC_MEM_BDEBUGRECORD by default 2000-12-22 18:30:26 +00:00
Brian Wellington
48540261f1 replace (isc_mem_debugging > 1) with (MEM_RECORD) 2000-12-22 00:26:33 +00:00
Mark Andrews
6fda157766 ISC_LINK_*UNSAFE -> ISC_LINK_INITAND* 2000-12-07 20:15:58 +00:00
Brian Wellington
1afae09da4 redundant code 2000-12-06 23:39:04 +00:00
David Lawrence
92f9189aee move definition of check_overrun() before its first use 2000-12-06 20:34:34 +00:00
David Lawrence
f616ef2ea9 missing close parenthesis for an isc_msgcat_get() in an
"#if ISC_MEM_TRACKLINES" block.
2000-12-06 20:32:12 +00:00
David Lawrence
9cd6d409b7 first pass at using isc_msgcat_get for message strings in libisc 2000-12-06 00:30:32 +00:00
Andreas Gustafsson
6e8d5fd217 missed some #ifdef->#if changes 2000-12-01 00:52:38 +00:00
Andreas Gustafsson
c52e5c8ed1 test the various memory debug flags with #if instead of #ifdef
so that they can be turned off by passing -DISC_MEM_FOO=0 on the compiler
command line; removed some historical cruft
2000-12-01 00:32:02 +00:00
Mark Andrews
07892e4443 Memory leak when ISC_MEM_TRACKLINES is defined. 2000-11-25 06:40:54 +00:00
Mark Andrews
5e589b5356 Uninitalised link fixes, batch 1. 2000-10-20 02:21:58 +00:00
Mark Andrews
78bdbbaccb 'more_frags' lost the memory after the last fragment. Add the remaining
memory to the appropriate free list.
2000-10-13 05:37:17 +00:00
Brian Wellington
0fded1c8b7 remove warnings. 2000-09-12 13:46:12 +00:00
Mark Andrews
1162a4e02a New function isc_mem_putanddetach(). 2000-09-05 03:30:19 +00:00
Mark Andrews
3a34b87c87 Add cache cleaning support (disabled). 2000-08-31 12:15:17 +00:00
Brian Wellington
6714319d0f Add a DESTROYLOCK macro to wrap isc_mutex_destroy() 2000-08-26 01:23:17 +00:00
Brian Wellington
281fce5ed7 When tracing allocations, don't die with an assertion failure if
isc_mem_setdestroycheck(mctx, ISC_FALSE) was called.  Also, print the
context in the trace statement.
2000-08-09 23:03:15 +00:00
David Lawrence
40f53fa8d9 Trailing whitespace trimmed. Perhaps running "perl util/spacewhack.pl in your
own CVS tree will help minimize CVS conflicts.  Maybe not.
Blame Graff for getting me to trim all trailing whitespace.
2000-08-01 01:33:37 +00:00
Michael Graff
a4cb99bf12 pasto 2000-07-27 23:31:20 +00:00
David Lawrence
15a4474541 word wrap copyright notice at column 70 2000-07-27 09:55:03 +00:00
Michael Graff
6d016e34bf minor formatting issue -- kill trailing whitespace 2000-07-26 20:56:39 +00:00
Michael Graff
bfab56849d Revamp memory stuff.
Now, if you define ISC_MEM_TRACKLINES, and set isc_mem_debugging = 2 first
thing in main(), isc_mem_stats() will dump the file/line where any leaking
allocations were made.
2000-07-26 19:06:20 +00:00
Brian Wellington
98164bc1ad Printing a size_t as either %d or %u doesn't work on some 64 bit architectures. 2000-06-26 20:27:42 +00:00
David Lawrence
9c3531d72a add RCS id string 2000-06-22 22:00:42 +00:00
David Lawrence
49dbdb0186 update_copyrights 2000-06-21 22:05:07 +00:00
Brian Wellington
4c050ce9dc typo 2000-06-06 17:57:58 +00:00
Brian Wellington
36bcb04af2 If ISC_MEM_DEBUG is enabled, the variable isc_mem_debugging controls
whether messages are printed or not.
2000-06-06 17:50:43 +00:00
David Lawrence
87cafc5e70 Megacommit of many files.
Mostly, several functions that take pointers as arguments, almost
always char * pointers, had those pointers qualified with "const".
Those that returned pointers to previously const-qualified arguments
had their return values qualified as const.  Some structure members
were qualified as const to retain that attribute from the variables
from which they were assigned.

The macro DE_CONST was added to isc/util.h to deal with a handful of very
special places where something is qualified as const but really needs to have
its const qualifier removed.

Also cleaned up a few places where variable names clashed with reserved
identifiers.  (Which mostly works fine, but strictly speaking is undefined
by the standard.)

Minor other ISC style cleanups.
2000-06-01 17:20:56 +00:00
David Lawrence
6d8cdbaff4 185. [bug] Fixed up handling of ISC_MEMCLUSTER_LEGACY. Several
public functions did not have an isc__ prefix, and
                        referred to functions that had previously been
                        renamed.

 184.   [cleanup]       Variables/functions which began with two leading
                        underscores were made to conform to the ANSI/ISO

function declaration and comment reformatting in accordance with coding
style document.

check_overrun conditionally compiled based on ISC_MEM_FILL and
ISC_MEM_CHECKOVERRUN to avoid compiler warnings about being defined
but not used if one of those two CPP symbols is not defined.
2000-05-16 05:17:31 +00:00
David Lawrence
1a69a1a78c Megacommit of dozens of files.
Cleanup of redundant/useless header file inclusion.

ISC style lint, primarily for function declarations and standalone
comments -- ie, those that appear on a line without any code, which
should be written as follows:
   /*
    * This is a comment.
    */
2000-05-08 14:38:29 +00:00
Bob Halley
6699408663 rename internal functions 2000-04-27 20:20:12 +00:00
David Lawrence
947bd6c648 <isc/mutex.h> does not need <isc/lang.h> or <isc/result.h>. 2000-04-26 01:29:27 +00:00
Bob Halley
fd3271152c Add isc_mem_attach(), isc_mem_detach(), isc_mem_preallocate(), and
isc_mem_setsplit().  Rename isc_mem_destroy_check() to
isc_mem_setdestroycheck().  Add isc_mem_inuse().
2000-04-12 01:24:17 +00:00
Andreas Gustafsson
e6e674f6a5 no need to include <isc/ondestroy.h> from <isc/mem.h> 2000-04-04 20:06:29 +00:00
Bob Halley
2190526544 Allow zero length allocations/deallocations. 2000-03-16 22:39:46 +00:00
David Lawrence
5f89718b7d Debugging versions of isc_mem_allocate, isc_mem_free and isc_mem_strdup.
This allows memory allocation/freeing to be tracked with ISC_MEM_DEBUG
as with isc_mem_get/isc_mem_put.   (To get the debugging information
before, mem.c itself needed to be recompiled with ISC_MEM_DEBUG on.)
2000-02-26 19:59:30 +00:00