| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
only needed when APR_POOL_DEBUG is defined,
but can be aor should be called from app code.
Providing stubs allows the app code to stay the
same when running with or without debugging APR
lib (no need for app recompilation).
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1863217 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1856873 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Avoids "conversion from 'size_t' to 'apr_uint32_t', possible loss" warnings.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1822357 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* memory/unix/apr_pools.c (apr_pool_get_tag): New function.
* test/testpools.c: Test it.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1817892 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
* memory/unix/apr_pools.c
(allocator_lock, allocator_unlock): New helpers.
(apr_allocator_max_free_set, allocator_alloc, allocator_free): Use
allocator_lock() and allocator_unlock().
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1806296 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
argument, for better scalability of the API.
Update apr_bucket_alloc_aligned_floor() from r1788335 accordingly.
Suggested by ivan.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1789947 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
allocators and pools, so axe apr_pool_alloc_order_set().
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1788376 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
apr_allocator_min_order_set() and apr_pool_alloc_order_set() to
respectively get the (system's) page size in use, set the minimum
allocation size for an allocator and the pool default allocation
size (expressed in 2^order pages).
Also allows for order-0 allocations (and pools), hence use index
MAX_INDEX (instead of index 0) to track oversized nodes.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1788346 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
would be allocated for the given size (including the header and alignment).
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1788334 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
global pool creation event. This ensures that the allocation
event from the cleanup registration written after the creation event.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1675982 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
don't try to emit any debug events after the debug log file handle
has been closed.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1675970 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
always emitted before allocation events and subpool destruction
events are emitted on pool clear/destroy for proper accounting.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1675967 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* memory/unix/apr_pools.c
(apr_pool_initialize): Add parent to debug header.
(apr_pool_log_event): Add parent to debug output.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1674566 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
* use defined constants for in_use
* don't use C99's __func__
* improve abort message
* fix some confusion wrt the destroyed state
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1595549 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
APR pools after clearing or destroying pools that allocated larger
nodes.
When allocating nodes from the bucket allocator (<= 80k or 20 pages),
we would eagerly reuse *any* free node that is at least the minimum
size. Depending on the pool usage scheme, that extra memory would
never be used. This patch limits the node to approximate twice the
minimum.
* memory/unix/apr_pools.c
(allocator_alloc): When searching the buckets for free nodes, limit
the range to twice the starting index.
Submitted by: Stefan Fuhrmann <stefan fuhrmann wandisco com>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1594729 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
s/appropiate/appropriate/
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1594684 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
Add new --enable-allocator-guard-pages configure option which works like
--enable-allocator-uses-mmap, but will also add inaccessible guard pages before
and after each memnode. This will result in higher ressource usage but allow
to find/protect against certain buffer overflow/overread bugs.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1593615 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enabled by new configure option --enable-pool-concurrency-check.
Compared to pool-owner-debugging, this only detects cases where there is actual
contention between accesses. The advantage is that runtime costs should be
relatively low.
The diagnostic messages could still use some improvement.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1593614 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1559343 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
- avoid using a destroyed mutex in apr_pool_clear()
- if we create a sub-pool, we don't need to own the pool.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1481186 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
apr_pool_create_unmanaged_ex()
PR: 54892
Submitted by: Valeriy V. Argunov <hzdbyte gmail com>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1478934 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Run the pool owner check part only after pre-cleanups have been run, in
order to give them a chance to kill of any threads that may still be
accessing the pool.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1460184 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Actually this function has been mentioned in the docs for over 10 years
but has never been implemented.
Also consistently destroy the thread's pool when it exits normally, not only
on apr_thread_exit(). This was already done on OS2.
Other platforms than unix are untested.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1460182 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1460180 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Teach valgrind about apr pools, allocators, and bucket allocators
if --with-valgrind is passed to configure.
This has less impact on program behavior and performance than compiling
with complete pool-debugging. Even with valgrind support compiled in,
the performance impact if not running under valgrind should be minimal.
It may make sense to use pool-debugging together with valgrind support
because pool-debugging does not help with allocators and bucket
allocators.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1438957 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
function is set.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1438940 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1130274 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1130270 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
[APR_POOL_DEBUG]: Catch NULL arguments which would lead to
strange segfaults later.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1082177 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of malloc in apr_allocator_alloc(). This greatly reduces
memory fragmentation with malloc implementations (e.g. glibc) that
don't handle allocationss of a page-size-multiples in an efficient way.
It also makes apr_allocator_max_free_set() actually have some effect
on such platforms.
The handling of page sizes other than 4k seems like a lot of trouble for a
very small number of platforms, but there does not seem to be a reasonable
way to check this at compile time.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1072165 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
current_free_index counts pages of size BOUNDARY_SIZE, but every node contains
index + 1 of such pages
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@990435 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
Author: Mladen Turk <mturk@apache.org>
Date: Thu Apr 2 16:58:40 2009 +0000
Both cleanup and pre_cleanup can share the same free list.
Axe the free_pre_cleanups and use free_cleanups for both
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@990431 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
- error handling issues
- use of uninitialized data
- null pointer dereference
- unused variables
- memory/fd leaks
- broken code in threadproc/beos/proc.c
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@979891 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@893840 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Unless the granularity is 4GB, there appears to be a truncation
issue using 32 bit ints on a 64 bit memory architecture platform.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@892435 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@892387 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have just as well been an include/arch/unix/apr_arch_common.h but
is entirely unnecessary.
The right solution is dozens of lines less code and confusion,
simply drive apr_filepath_list_split|merge from filepath_util.c
brought in from the unix/ directory, across all platforms.
One 'temporary' cast was in use by apr_pools.c, the other was
entirely unused.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@892127 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix overflow in pools and rmm, where size alignment was taking place.
Reported by: Matt Lewis <mattlewis@google.com>
* CHANGES
Add entry for CVE-2009-2412.
* memory/unix/apr_pools.c
(allocator_alloc, apr_palloc): Check for overflow after aligning size.
(apr_pcalloc): Drop aligning of size; clearing what the caller asked for should suffice.
* util-misc/apr_rmm.c
(apr_rmm_malloc, apr_rmm_calloc, apr_rmm_realloc): Check for overflow after aligning size.
Submitted by: Matt Lewis <mattlewis@google.com>, Sander Striker
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@800730 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
use malloc() directly.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@795598 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@795384 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@795381 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
It is used only so we can create our mutex that will survive pool_clear
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@761692 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@761662 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
Still cannot figure out for wth is final_block used for...
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@761587 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
Axe the free_pre_cleanups and use free_cleanups for both
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@761344 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Anyhow, no need to store the pointer to already linked list just to be able to
call the free on that pointer
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@761339 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
mechanism. If it was not provided with a separate allocator
it used the parent allocator for locking.
Use the still present allocator argument to apr_pool_create_ex to
determine the correct level of granularity: If no allocator is passed
in use the mutex from the parent instead of creating a new one by
our self.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@759519 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
to avoid having to malloc them in apr_pool_create.
(apr_pool_create): Switch the ->blocks pointer between the two
block structures. Avoid freeing either.
(block_list_destroy_all): Don't free the final block_list_t.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@758648 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@758623 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Plus the struct now fits in an 8k page.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@758622 13f79535-47bb-0310-9956-ffa450edef68
|