1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-17 04:23:50 +03:00
Commit Graph

14 Commits

Author SHA1 Message Date
Volker Lendecke
287e29d988 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
2008-01-09 17:05:19 -08:00
Stefan Metzmacher
84ebb6cac2 r25230: sync lib/talloc with SAMBA_4_0
metze
2007-10-10 12:30:52 -05:00
Jeremy Allison
2243a73d65 r25164: Add talloc_asprintf_append_buffer() and the docs for it.
Jeremy.
2007-10-10 12:30:47 -05:00
Andrew Tridgell
c676a97114 r23798: updated old Temple Place FSF addresses to new URL 2007-10-10 12:28:26 -05:00
Andrew Tridgell
1b78cace50 r23790: LGPLv3+ conversion for our LGPLv2+ library code 2007-10-10 12:28:25 -05:00
Jeremy Allison
da78488b86 r22564: Move the _strict -> _zeronull functions into lib/util.c
and out of talloc at tridge's request.
Jeremy.
2007-10-10 12:19:45 -05:00
Jeremy Allison
fcbfa2c991 r22541: Added talloc_size_strict macro.
Jeremy.
2007-10-10 12:19:43 -05:00
Jeremy Allison
06b47f3d72 r22540: Added _strict varients of the macro calls - added
prototypes.
Jeremy.
2007-10-10 12:19:43 -05:00
Jeremy Allison
1283da1bf8 r22539: Added _strict varients of the talloc calls to
return NULL on size == 0 varients.
Jeremy.
2007-10-10 12:19:43 -05:00
Stefan Metzmacher
7fab12b34a r22366: sync lib/talloc/ with samba4
metze
2007-10-10 12:19:29 -05:00
Stefan Metzmacher
4c93c05542 r22268: merge from samba4:
protect #define __location__ with an #ifndef

metze
2007-10-10 12:19:23 -05:00
Stefan Metzmacher
c718eb7a7c 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
2007-10-10 12:16:31 -05:00
Herb Lewis
e710a7d39a r20131: get rid of a few no previous prototype warnings 2007-10-10 12:16:26 -05:00
Stefan Metzmacher
d49ffbc19b r18810: use a copy of samba4's talloc under lib/talloc/
to make mergeing easier.

metze
2007-10-10 12:01:02 -05:00