postgresql/src
Bruce Momjian 46fb9c29e2 Here is the patch with memory leak checker. This checker allow detect
in-chunk leaks, overwrite-next-chunk leaks and overwrite block-freeptr leaks.

A in-chunk leak --- if something overwrite space after wanted (via palloc()
size, but it is still inside chunk. For example

        x = palloc(12);         /* create 16b chunk */
        memset(x, '#', 13);

this leak is in the current source total invisible, because chunk is 16b and
leak is in the "align space".

 For this feature I add data_size to StandardChunk, and all memory which go
from AllocSetAlloc() is marked as 0x7F.

 The MemoryContextCheck() is compiled '#ifdef USE_ASSERT_CHECKING'.

I add this checking to 'tcop/postgres.c' and is active after each backend
query, but it is probably not sufficient, because some MemoryContext exist
only during memory processing --- will good if someone who known where
it is needful (Tom:-) add it for others contexts;
 A problem in the current source is that we have still some malloc()
allocation that is not needful and this allocation is total invisible for
all context routines. For example Dllist in backend (pretty dirty it is in
catcache where values in Dllist are palloc-ed, but list is malloc-ed).
--- and BTW. this Dllist design stand in the way for query cache :-)

 Tom, if you agree I start replace some mallocs.

 BTW. --- Tom, have you idea for across transaction presistent allocation for
          SQL functions? (like regex - now it is via malloc)


 I almost forget. I add one if() to AllocSetAlloc(), for 'size' that are
greater than ALLOC_BIGCHUNK_LIMIT is not needful check AllocSetFreeIndex(),
because 'fidx' is always 'ALLOCSET_NUM_FREELISTS - 1'. It a little brisk up
allocation for very large chunks. Right?

                                                Karel
2000-07-11 14:30:37 +00:00
..
backend Here is the patch with memory leak checker. This checker allow detect 2000-07-11 14:30:37 +00:00
bin Done. In backend/commands/define.c unused field is set to '-' for the 2000-07-11 13:07:17 +00:00
corba Updating and addign files... 1998-11-19 02:39:51 +00:00
data I've sent 3 mails to pgsql-patches. There are two files, one for doc 1999-08-16 20:27:19 +00:00
include Here is the patch with memory leak checker. This checker allow detect 2000-07-11 14:30:37 +00:00
interfaces Another round of those unportable config/build changes :-/ 2000-07-09 13:14:19 +00:00
makefiles Substituted new configure test for types of accept() 2000-06-11 11:40:09 +00:00
pl Update textin() and textout() to new fmgr style. This is just phase 2000-07-05 23:12:09 +00:00
template Fixes for Solaris/cc suggested by <pgsql-hackers@thewrittenword.com> 2000-06-30 16:11:02 +00:00
test Fix handling of pre-existing LD_LIBRARY_PATH, from Keith Parks 2000-07-09 13:19:24 +00:00
tools Attached is a new patch which addresses this problem. (oids in 2000-07-02 22:01:27 +00:00
tutorial Another round of updates for new fmgr, mostly in the datetime code. 2000-06-09 01:11:16 +00:00
utils Version number now set in configure, available through Makefile.global 2000-07-02 15:21:27 +00:00
win32 Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
DEVELOPERS just testing a script... 1999-07-30 03:45:57 +00:00
GNUmakefile.in Backend makefile cleanup. make maintainer-clean is now completely 2000-07-06 21:33:45 +00:00
Makefile Put back old Makefiles, in pgsql and pgsql/src. 2000-06-12 16:37:22 +00:00
Makefile.global.in Another round of those unportable config/build changes :-/ 2000-07-09 13:14:19 +00:00
Makefile.shlib |> The Makefile.shlib changes will have to be discussed with other Linux 2000-07-07 01:23:44 +00:00
win32.mak Hi! 2000-01-18 19:05:31 +00:00