1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00
Commit Graph

34 Commits

Author SHA1 Message Date
Volker Lendecke
138954e70e Fix a c++ warning
(This used to be commit ee905a085f)
2008-01-10 12:28:20 +01:00
Volker Lendecke
97a50593fe talloc_free_children can only reset pool if it's empty
(This used to be commit 0272b46515)
2008-01-10 12:28:20 +01:00
Volker Lendecke
4803cc5d3c Mark talloc_pool memory for valgrind
(This used to be commit d89e42f1d2)
2008-01-10 12:28:20 +01:00
Volker Lendecke
1ed4fcb271 Implement talloc_pool()
A talloc pool is a chunk of memory that can be used as a context for further
talloc calls. Allocations with the pool as the parent just chew from that
memory by incrementing a pointer. If the talloc pool is full, then we fall back
to the normal system-level malloc(3) to get memory.

The use case for talloc pools is the transient memory that is used for handling
a single SMB request. Incrementing a pointer will be way faster than any malloc
implementation.

There is a downside of this: If you use talloc_steal() to move something out of
the pool, the whole pool memory is kept around until the last object inside the
pool is freed. So if you talloc_free() the pool, it might happen that the
memory is freed later. So don't hang anything off a talloc pool that should
live long.

Volker
(This used to be commit 287e29d988)
2008-01-09 17:05:19 -08:00
Michael Adam
2e3ac4d3fe Add a comment.
Michael
(This used to be commit 3a4bf4b7c3)
2008-01-09 01:35:43 +01:00
Michael Adam
ebb21268df Fix talloctort: move size check after referenced ptr check.
Michael
(This used to be commit 45b219642c)
2008-01-09 01:34:21 +01:00
Volker Lendecke
0af2efcdc4 Don't shrink a talloc area if we have less than 1k to gain
(This used to be commit 28a72ebd45)
2008-01-09 00:10:16 +01:00
Stefan Metzmacher
10cb1b87ed r25230: sync lib/talloc with SAMBA_4_0
metze
(This used to be commit 84ebb6cac2)
2007-10-10 12:30:52 -05:00
Jeremy Allison
47107b2cde r25164: Add talloc_asprintf_append_buffer() and the docs for it.
Jeremy.
(This used to be commit 2243a73d65)
2007-10-10 12:30:47 -05:00
Jeremy Allison
4754b0ec65 r25116: Fix talloc_asprintf_append to do the right thing with
truncated strings.
Jeremy.
(This used to be commit 93c42fd9b5)
2007-10-10 12:30:41 -05:00
Stefan Metzmacher
3b29c9cbed r24627: merge from SAMBA_4_0:
as TALLOC_ABORT() is defined to abort() by default
wrap it into a function so that the function name
in the backtrace shows what happens.

metze
(This used to be commit ddbe971030)
2007-10-10 12:30:11 -05:00
Andrew Tridgell
0726ed4f41 r23802: fixed URL in XML
(This used to be commit 256301a21a)
2007-10-10 12:28:28 -05:00
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -05:00
Andrew Tridgell
674b835241 r23799: updated old Franklin Street FSF addresses to new URL
(This used to be commit 43cd589773)
2007-10-10 12:28:26 -05:00
Andrew Tridgell
9fa1c63578 r23798: updated old Temple Place FSF addresses to new URL
(This used to be commit c676a97114)
2007-10-10 12:28:26 -05:00
Andrew Tridgell
2c09988e46 r23790: LGPLv3+ conversion for our LGPLv2+ library code
(This used to be commit 1b78cace50)
2007-10-10 12:28:25 -05:00
Jeremy Allison
2a9b4da0fa r23780: Find and fix more GPL2 -> GPL3.
Jeremy.
(This used to be commit c2f7ab1c17)
2007-10-10 12:28:21 -05:00
Stefan Metzmacher
dcc2fe7cb6 r22759: sync lib/talloc with samba4
metze
(This used to be commit 86c510e319)
2007-10-10 12:21:54 -05:00
Jeremy Allison
4ab6a8ebb7 r22564: Move the _strict -> _zeronull functions into lib/util.c
and out of talloc at tridge's request.
Jeremy.
(This used to be commit da78488b86)
2007-10-10 12:19:45 -05:00
Jeremy Allison
fdc0b87083 r22541: Added talloc_size_strict macro.
Jeremy.
(This used to be commit fcbfa2c991)
2007-10-10 12:19:43 -05:00
Jeremy Allison
f3cf873c81 r22540: Added _strict varients of the macro calls - added
prototypes.
Jeremy.
(This used to be commit 06b47f3d72)
2007-10-10 12:19:43 -05:00
Jeremy Allison
c07643fa18 r22539: Added _strict varients of the talloc calls to
return NULL on size == 0 varients.
Jeremy.
(This used to be commit 1283da1bf8)
2007-10-10 12:19:43 -05:00
Stefan Metzmacher
3255daa188 r22366: sync lib/talloc/ with samba4
metze
(This used to be commit 7fab12b34a)
2007-10-10 12:19:29 -05:00
Stefan Metzmacher
d917f708e1 r22268: merge from samba4:
protect #define __location__ with an #ifndef

metze
(This used to be commit 4c93c05542)
2007-10-10 12:19:23 -05:00
Andrew Tridgell
5f8840ec84 r21176: merged va_end() changes from Samba4
(This used to be commit 04f6f01dfe)
2007-10-10 12:17:45 -05:00
Stefan Metzmacher
247e1667b0 r20197: merge talloc fixes from samba4:
- make most static functions inline
- handle NULL pointers in talloc_parent_chunk()
- use talloc_parent_chunk() in talloc_parent_name()
  to fix a bug found by the IBM checker

metze
(This used to be commit c718eb7a7c)
2007-10-10 12:16:31 -05:00
Herb Lewis
6914b29daa r20131: get rid of a few no previous prototype warnings
(This used to be commit e710a7d39a)
2007-10-10 12:16:26 -05:00
Volker Lendecke
e37200a82e r19774: Fix typo
(This used to be commit 842599a7fd)
2007-10-10 12:15:54 -05:00
Volker Lendecke
dd8f8c01b7 r19666: Talloc_guide text on multithreading by Remi Turboult
(This used to be commit 36a7bf738a)
2007-10-10 12:15:45 -05:00
Andrew Tridgell
2729f448c0 r19431: merge recent talloc performance improvements from Samba4
(This used to be commit ced12bd6d8)
2007-10-10 12:15:35 -05:00
Andrew Tridgell
803d33a326 r19125: merge from samba4
(This used to be commit 65e1500ae6)
2007-10-10 12:15:14 -05:00
Stefan Metzmacher
43be47f56b r18996: merge from samba4:
- fix bug 4078
- talloc_free(talloc_autofree_context()); should not result
  in a SIGABORT on exit
- add a test for this, but this test can also pass in the standalone build
  and samba3, as samba4 uses talloc_autofree_context()

metze
(This used to be commit f5b0924f97)
2007-10-10 12:14:54 -05:00
Stefan Metzmacher
cf5ab86a65 r18952: fix compiler warning (merge from samba4)
metze
(This used to be commit 4cd59d47c8)
2007-10-10 12:14:50 -05:00
Stefan Metzmacher
21931b1ca8 r18810: use a copy of samba4's talloc under lib/talloc/
to make mergeing easier.

metze
(This used to be commit d49ffbc19b)
2007-10-10 12:01:02 -05:00