summaryrefslogtreecommitdiff
path: root/source3/lib/talloc.c
AgeCommit message (Collapse)AuthorFilesLines
2002-12-23Finish adding strings to all talloc_init() calls.Jeremy Allison1-1/+0
Jeremy. (This used to be commit aa8439a49ec4b9f433745fefa1e769e45398f4df)
2002-12-20Forward port the change to talloc_init() to make all talloc contextsJeremy Allison1-3/+3
named. Ensure we can query them. Jeremy. (This used to be commit 09a218a9f6fb0bd922940467bf8500eb4f1bcf84)
2002-12-14The name pointer in the talloc context must not be a talloced entry asJeremy Allison1-2/+13
calling talloc_destroy_pool(as we do sometimes) will destroy it. Jeremy. (This used to be commit bcd22a9039b0fb3697ebc4377898cc7ecfd853cc)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-6/+25
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-03-18more verbose checking in talloc and util_pwSimo Sorce1-39/+49
fixed tdbsam memory corruption (and segfault) reducing calls to pdb_uid_to_user_rid and countrary to 0 to move to a non alghoritmic rid allocation with some passdb modules. (This used to be commit 9836af7cd623357feaec07bc49cfb78f0aa01fc3)
2002-03-14getpid() -> sys_getpid()Tim Potter1-1/+1
(This used to be commit a3cea5e9ae3b53ecbc45e61a39cbce0ca1b916aa)
2002-03-10Fix typo.Martin Pool1-1/+1
(This used to be commit 58c1b11439ef58313895a23a2e9a0ec735903eb6)
2002-01-30Removed version number from file header.Tim Potter1-1/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-25picky about reallocJean-François Micouleau1-5/+6
J.F. (This used to be commit 873dba59cf4e1f7ebb3593d890b9de7c8cd25653)
2002-01-14FIXME We should turn the global list off when using Insure++,Martin Pool1-0/+3
otherwise all the memory will be seen as still reachable. (This used to be commit 682e7cd394c1e1cc9a83f7e8e5e3694e083946c4)
2002-01-03Cope nicely with pools with no name.Martin Pool1-1/+10
(This used to be commit 86abefc17260387b6b68c71ad5587ef0212162c0)
2002-01-03talloc accounting now includes number of chunks and bytes allocated.Martin Pool1-9/+42
(This used to be commit cd25d01e42e7874bc93f6ca336c5b2cde453bb52)
2002-01-03Add talloc_asprintf_append, which grows an existing string buffer toMartin Pool1-4/+76
contain new print-formatted information. (Also talloc_vasprintf_append.) Idea borrowed from glib. (This used to be commit 53723e874885936dd67483ebf46601fc73489d17)
2001-12-20Add --enable-dmalloc to link against the dmalloc malloc debugger.Martin Pool1-1/+7
It's not as strong as Insure, but it's free, reasonably efficient and works on every platform. (This used to be commit e76d27fcdb33df5212ca5b0ce53c77ed8ca58906)
2001-12-19Make TALLOC_CTX and talloc_chunk private to talloc.c.Martin Pool1-4/+74
Add a global singly-linked list of all active talloc pools, so that we can eventually show how much memory is used for different purposes. This also gives a check that pools are not being doubly freed. talloc_init_named now handle a NULL name properly (ie does nothing) Add accessor talloc_pool_name(). (This used to be commit 4c6c03c8c7c18762dd9ef1a1bd88350b8960542f)
2001-12-19DocMartin Pool1-8/+12
(This used to be commit 7da982e9268be7eb93fe7d6ad7da5b33ce44181c)
2001-12-19DocMartin Pool1-1/+7
(This used to be commit 5dc2827b6eaca8f7b833fdf9977528084e3a3ff0)
2001-12-19Put PRINTF_ATTRIBUTE on talloc_init_named, talloc_asprintf,Martin Pool1-3/+3
talloc_vasprintf. (This used to be commit e6be48671d520f952be0b6dc0848569d0d834179)
2001-12-19Doc.Martin Pool1-0/+6
(This used to be commit 5b6c22a209a26cb9adbf6d7733d396038c729633)
2001-12-19Start adding some debugging features to talloc based on Samba'sMartin Pool1-7/+38
ancient mem_man.c: Each TALLOC_CTX now has a field to store its purpose, to aid in tracking down memory bloat. A new call talloc_init_named() should be used instead of talloc_init() so that this is set. Added talloc_vasprintf to be called by varargs functions. (This used to be commit 25b97a743573b8c5e0ac886e4bfab581c11b3714)
2001-12-05fixed an off by 1 bug in talloc_asprintf()Andrew Tridgell1-1/+1
(This used to be commit 2b2155beaef17a13c0e867c3dcfe8c323e84a9a3)
2001-12-04const religion in talloc callsAndrew Tridgell1-2/+2
(This used to be commit ea5d2857217b860da7e53bc6e8ccfe48a2b3620e)
2001-10-14return of vsnprintf doesn't include terminationAndrew Tridgell1-1/+1
thanks to simo for spotting this (This used to be commit acd84ed762a5f50c69c79d13cb18e4204096b304)
2001-10-14bit neater talloc_asprintf() implementationAndrew Tridgell1-19/+11
(This used to be commit 8ca8875cd94dce8827ce8cb857b2d7a959ab7891)
2001-10-13introduce mangle backward compatibility functionsSimo Sorce1-0/+31
add talloc_asprintf() (This used to be commit 7264d611eff871f424d449e1ff1c7ec3f5fdde40)
2001-09-17move to SAFE_FREE()Simo Sorce1-5/+4
(This used to be commit 60e907b7e8e1c008463a88ed2b076344278986ef)
2001-08-08Change all realloc() statements to Realloc() (ecxept for tdb.c)Simo Sorce1-1/+1
changed some code to exploit the fact that Realloc(NULL, size) == malloc(size) fixed some possible mem leaks, or seg faults. thanks to andreas moroder (mallocs not checked in client/client.c, client/smbumount.c) (This used to be commit 7f33c01688b825ab2fa9bbb2730bff4f2fa352be)
2001-07-02Made talloc_realloc() semantics match realloc(). JF was complaining :-).Jeremy Allison1-0/+8
realloc(NULL) == malloc. realloc(p,0) == free() - a no-op in talloc. Jeremy. (This used to be commit 1ab31e5db53bc839d2785cce4d3c739c8004bbf6)
2001-06-22Spelling fix.Tim Potter1-1/+1
(This used to be commit 5f4889beb9311fd3912c3dfccf18fc9ab22b964c)
2001-06-22the BAD_PTR idea in talloc.h is actually a bad idea - it means callers have ↵Andrew Tridgell1-7/+1
no way of telling if the call really failed (This used to be commit 7a96ca313e2f6b5ad8a713babd3cac0bbcc4c399)
2001-05-11Added talloc_strdup() funcion.Tim Potter1-0/+6
(This used to be commit eea43a5a916eb7f4bef6817ce0aa8051f9145b18)
2001-03-23Added Gerald's fixes.Jeremy Allison1-1/+0
Jeremy. (This used to be commit be825b07464f54d717333318a08154cff632f706)
2001-03-23a much simpler talloc() implementation. This version has the followingAndrew Tridgell1-29/+36
advantages: - memory is trackable by insure - a very simple talloc_realloc() is possible (I've added it) It is slower than the previous talloc code, but I don't think that is going to be a problem. If it is a problem then there are some ways we can make it faster but I'd like to leave those until we have tested this a bit and can see what performance problems might show up in profiling (This used to be commit 1ab63cf3a6f62c3e4ca19a549bde78dad0eb4340)
2001-02-28Move to talloc control of SPOOL_XXX structs. Move to talloc control ofJeremy Allison1-0/+13
security descriptors and pointers. Syncup with 2.2 tree. Jeremy. (This used to be commit 14d5997dc841e78a619e865288486d50c245896d)
2001-02-27Added total memory allocated counter to talloc, so we can tell if a tallocJeremy Allison1-0/+22
pool is getting bloated. Also added a talloc_zero function to return zeroed memory. Added debug in rpc_server/srv_pipe_hnd.c so we know when a talloc pool is being freed. Syncup with srv_pipe_hnd.c from 2.2 so we are freeing memory at the same time. Jeremy. (This used to be commit d3a56c6042acf037bbd53de88d7636a5803ead20)
2000-12-15Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. MergedJeremy Allison1-0/+5
in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open problem. Jeremy. (This used to be commit 0a40bc83e14c69a09948ec09bb6fc5026c4f4c14)
2000-08-12reworked talloc() to in order to help track down invalidGerald Carter1-25/+26
memory access. Tridge, I don't think using 0xdeadbeef for size allocations of 0 is going to work. I ended up having to use NULL as much code that works on UNISTR checks to see if the buffer ptr is NULL. So valid code ends up with a seg fault. Rather than rewriting it all, I added a DEBUG_TALLOC #ifdef in talloc.h that sets a macro BAD_PTR. This is the value assigned to ptr for an allocation of 0 bytes. jerry (This used to be commit 233b9cffa2350552d9f775f791d5d5e0464a1ed4)
2000-08-10talloc returns 0xdeadbeef when asked to allocate 0 bytesGerald Carter1-19/+29
jerry (This used to be commit df51dc32f6ffc4fe2cebfaae5079417aad1ff34d)
2000-07-27Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison1-1/+8
in the RPC code. This change was prompted by trying to save a long (>256) character comment in the printer properties page. The new system associates a TALLOC_CTX with the pipe struct, and frees the pool on return of a complete PDU. A global TALLOC_CTX is used for the odd buffer allocated in the BUFFERxx code, and is freed in the main loop. This code works with insure, and seems to be free of memory leaks and crashes (so far) but there are probably the occasional problem with code that uses UNISTRxx structs on the stack and expects them to contain storage without doing a init_unistrXX(). This means that rpcclient will probably be horribly broken. A TALLOC_CTX also needed associating with the struct cli_state also, to make the prs_xx code there work. The main interface change is the addition of a TALLOC_CTX to the prs_init calls - used for dynamic allocation in the prs_XXX calls. Now this is in place it should make dynamic allocation of all RPC memory on unmarshall *much* easier to fix. Jeremy. (This used to be commit 0ff2ce543ee54f7364e6d839db6d06e7ef1edcf4)
2000-06-26fixed size alignment in tallocAndrew Tridgell1-2/+2
(This used to be commit 064cdb7ee69bff3af12d1e0b3c3b59207c594681)
2000-01-11Fixed pointer arithmetic found by IRIX compiler.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 20d72e8959fc800836369e4c970f7cb84b95ac9a)
2000-01-05implemented talloc() as described on samba-technical. This fixes theAndrew Tridgell1-0/+96
lp_string() bug properly. we still need to add lp_talloc_free() calls in all the main event loops, I've only put it in smbd and nmbd thus far. (This used to be commit aa7f81552540f5dca2c146f5edd805611d5b390f)