~ubuntu-branches/ubuntu/saucy/ldb/saucy

« back to all changes in this revision

Viewing changes to lib/talloc/talloc.h

  • Committer: Package Import Robot
  • Author(s): Andrew Bartlett
  • Date: 2013-02-12 19:02:05 UTC
  • mfrom: (1.4.3)
  • Revision ID: package-import@ubuntu.com-20130212190205-gkz9ztqkv1k1v07x
Tags: 1:1.1.15-1.1
* Non-maintainer upload.
* New upstream release.
* Drop 01_exclude_symbols, now upstream 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1842
1842
 */
1843
1843
void talloc_set_log_stderr(void);
1844
1844
 
 
1845
/**
 
1846
 * @brief Set a max memory limit for the current context hierarchy
 
1847
 *        This affects all children of this context and constrain any
 
1848
 *        allocation in the hierarchy to never exceed the limit set.
 
1849
 *        The limit can be removed by setting 0 (unlimited) as the
 
1850
 *        max_size by calling the funciton again on the sam context.
 
1851
 *        Memory limits can also be nested, meaning a hild can have
 
1852
 *        a stricter memory limit than a parent.
 
1853
 *        Memory limits are enforced only at memory allocation time.
 
1854
 *        Stealing a context into a 'limited' hierarchy properly
 
1855
 *        updates memory usage but does *not* cause failure if the
 
1856
 *        move causes the new parent to exceed its limits. However
 
1857
 *        any further allocation on that hierarchy will then fail.
 
1858
 *
 
1859
 * @param[in]   ctx             The talloc context to set the limit on
 
1860
 * @param[in]   max_size        The (new) max_size
 
1861
 */
 
1862
int talloc_set_memlimit(const void *ctx, size_t max_size);
 
1863
 
1845
1864
/* @} ******************************************************************/
1846
1865
 
1847
1866
#if TALLOC_DEPRECATED