1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-08 16:23:49 +03:00
Commit Graph

10 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
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
Stefan Metzmacher
86c510e319 r22759: sync lib/talloc with samba4
metze
2007-10-10 12:21:54 -05:00
Stefan Metzmacher
7fab12b34a r22366: sync lib/talloc/ with samba4
metze
2007-10-10 12:19:29 -05:00
Andrew Tridgell
ced12bd6d8 r19431: merge recent talloc performance improvements from Samba4 2007-10-10 12:15:35 -05:00
Andrew Tridgell
65e1500ae6 r19125: merge from samba4 2007-10-10 12:15:14 -05:00
Stefan Metzmacher
f5b0924f97 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
2007-10-10 12:14:54 -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