about summary refs log tree commit diff
path: root/manual
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2013-09-20 11:10:55 -0300
committerAlexandre Oliva <aoliva@redhat.com>2013-09-20 11:50:08 -0300
commit35fed6f15d3d29c02203a3fe2e446e205d45b0ff (patch)
tree22861471442264b51f40c4619169ad13ad269426 /manual
parent6999d38c953e568f0488572c0a68cba32286a2c3 (diff)
downloadglibc-35fed6f15d3d29c02203a3fe2e446e205d45b0ff.tar.gz
glibc-35fed6f15d3d29c02203a3fe2e446e205d45b0ff.tar.xz
glibc-35fed6f15d3d29c02203a3fe2e446e205d45b0ff.zip
Add probes for malloc retries.
for ChangeLog

	* malloc/malloc.c (__libc_malloc): Add memory_malloc_retry probe.
	(__libc_realloc): Add memory_realloc_retry probe.
	(__libc_memalign): Add memory_memalign_retry probe.
	(__libc_valloc): Add memory_valloc_retry probe.
	(__libc_pvalloc): Add memory_pvalloc_retry probe.
	(__libc_calloc): Add memory_calloc_retry probe.
	* manual/probes.texi: Document them.
Diffstat (limited to 'manual')
-rw-r--r--manual/probes.texi22
1 files changed, 22 insertions, 0 deletions
diff --git a/manual/probes.texi b/manual/probes.texi
index 7f066d6a51..50e0fc24f6 100644
--- a/manual/probes.texi
+++ b/manual/probes.texi
@@ -26,6 +26,28 @@ the virtual memory subsystem of @theglibc{}.  The location and the
 availability of some probes depend on whether per-thread arenas are
 enabled (the default) or disabled at the time @theglibc{} is compiled.
 
+@deftp Probe memory_malloc_retry (size_t @var{$arg1})
+@deftpx Probe memory_realloc_retry (size_t @var{$arg1}, void *@var{$arg2})
+@deftpx Probe memory_memalign_retry (size_t @var{$arg1}, size_t @var{$arg2})
+@deftpx Probe memory_valloc_retry (size_t @var{$arg1})
+@deftpx Probe memory_pvalloc_retry (size_t @var{$arg1})
+@deftpx Probe memory_calloc_retry (size_t @var{$arg1})
+These probes are triggered when the corresponding functions fail to
+obtain the requested amount of memory from the arena in use, before they
+call @code{arena_get_retry} to select an alternate arena in which to
+retry the allocation.  Argument @var{$arg1} is the amount of memory
+requested by the user; in the @code{calloc} case, that is the total size
+computed from both function arguments.  In the @code{realloc} case,
+@var{$arg2} is the pointer to the memory area being resized.  In the
+@code{memalign} case, @var{$arg2} is the alignment to be used for the
+request, which may be stricter than the value passed to the
+@code{memalign} function.
+
+Note that the argument order does @emph{not} match that of the
+corresponding two-argument functions, so that in all of these probes the
+user-requested allocation size is in @var{$arg1}.
+@end deftp
+
 @deftp Probe memory_arena_new (void *@var{$arg1}, size_t @var{$arg2})
 This probe is triggered when @code{malloc} allocates and initializes an
 additional arena (not the main arena), but before the arena is assigned