Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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 287e29d988813007eeebc0c2bef3b46ab8bedee9)
|
|
metze
(This used to be commit 84ebb6cac224cabf3856a632de80a8a9c687329b)
|
|
Jeremy.
(This used to be commit 2243a73d650319208aebbbaf65dfba2a508a7c10)
|
|
(This used to be commit c676a971142d7176fd5dbf21405fca14515a0a76)
|
|
(This used to be commit 1b78cace504f60c0f525765fbf59d9cc6506cd4d)
|
|
and out of talloc at tridge's request.
Jeremy.
(This used to be commit da78488b86c464b6861d36398cca7524ad5906fe)
|
|
Jeremy.
(This used to be commit fcbfa2c99175780524d2258885410c79bbb12d6e)
|
|
prototypes.
Jeremy.
(This used to be commit 06b47f3d72d0ca1c83842dff3425d8dacd283fff)
|
|
return NULL on size == 0 varients.
Jeremy.
(This used to be commit 1283da1bf8ebe458cf84ee4a703909945cdfcd88)
|
|
metze
(This used to be commit 7fab12b34a818f029f4285a59d6e49768b7f8e79)
|
|
protect #define __location__ with an #ifndef
metze
(This used to be commit 4c93c05542c5a238b1b7a5cd9b75f9f852c0ad4d)
|
|
- 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 c718eb7a7c3cdc4acb25f303a73a3ca478c27af0)
|
|
(This used to be commit e710a7d39a662a1a339f3f71c4b051fde1bb5a16)
|
|
to make mergeing easier.
metze
(This used to be commit d49ffbc19b29f7620e427de133ffab74721f37e8)
|