summaryrefslogtreecommitdiff
path: root/memory
Commit message (Collapse)AuthorAgeFilesLines
* Remove .cvsignore files.jorton2004-11-181-5/+0
| | | | | | | Tipped-of-by: Uwe Zeisberger git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@76269 13f79535-47bb-0310-9956-ffa450edef68
* WIN64: update pools code for 64 bit compilesake2004-10-071-9/+15
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65364 13f79535-47bb-0310-9956-ffa450edef68
* Reuse cleanup structures to prevent memory consumption from repeatedjorton2004-06-171-1/+14
| | | | | | | | | | | | | | | | | | | register/kill of a cleanup against a single pool: * memory/unix/apr_pools.c (struct apr_pool_t): Add freelist for cleanup structures. (apr_pool_cleanup_kill): Move used cleanup structures onto the freelist. (apr_pool_cleanup_register): Reuse cleanup structure if available. (apr_pool_clear, pool_clear_debug, apr_pool_create): Clear the freelist. * test/testpools.c (checker_cleanup, success_cleanup, test_cleanups): Add tests for cleanups. PR: 23567 (the easy half) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65206 13f79535-47bb-0310-9956-ffa450edef68
* Relicense APR under Apache License, Version 2.0jerenkrantz2004-02-131-49/+10
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
* First whack at switching to a single top-level make. This adds a dependencygstein2004-02-051-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | upon Python at packaging time, but not at end-user config/build time. As far as I can tell, the build continues to function properly. (out-of-dir config/make not tested, and apr-iconv prolly needs some work) The buildconf scripts now generate a build-outputs.mk file which is included by the root's Makefile (via the build/gen-build.py script). bulid-outputs.mk specifies all of the various files present in the distribution. The top-level Makefiles were simplified to use an $(OBJECTS) symbol rather than 'find'ing them. Similarly, a $(HEADERS) symbol is used for the exports. The corresponding delete-* targets were eliminated since we have a precise set of inputs. The subdirs' Makefiles were removed since they are no longer called/used. The apr-util/uri Makefile was responsible for compiling a C program to generate the uri_delims.h file. That process was replaced by a Python script to generate the header (called by buildconf). The .c and .dsp were left for the Windows build to continue, but that should be revamped. build/apr_rules.mk was revamped somewhat to avoid recursion, but a lot of cleanup is still needed. Much of the recursive/local/x- logic is no longer needed and can be elimianated. rules.mk was created for inclusion by N makefiles, but that isn't really true any more, so it could probably be tossed (caveat: test/Makefile). Saved for a phase 2. Some additional work was added to properly clean up files in */build/, rather than relying on a makefile in there. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64891 13f79535-47bb-0310-9956-ffa450edef68
* Move the NetWare memory pool cleanup code outside of the APR_POOL_DEBUG #if ↵bnicholes2004-02-021-18/+23
| | | | | | | | | so that the clean up will happen regardless of the debugging mode. Submitted by: Jean-Jacques Clar [jjclar@novell.com] git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64889 13f79535-47bb-0310-9956-ffa450edef68
* Since all NetWare memory is shared, allowing an application access to the ↵bnicholes2003-12-091-0/+7
| | | | | | APR global pool allows it to allocate memory and set cleanups that will never happen even if the application terminates. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64825 13f79535-47bb-0310-9956-ffa450edef68
* * memory/unix/apr_pools.cstriker2003-11-061-0/+4
| | | | | | | | | (pool_clear_debug): When there is a child pool present after cleanups have been run, we know that a cleanup created a child pool. This results in orphaned pools, so in debug mode, abort(). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64735 13f79535-47bb-0310-9956-ffa450edef68
* Submitted by: Joe Ortonstriker2003-10-301-37/+26
| | | | | | | | | | | | Reviewed by: Greg Stein, Cliff Woolley, Sander Striker * memory/unix/apr_pools.c (list_insert, list_remove): new macros to do manipulation of lists throughout the pools code. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64701 13f79535-47bb-0310-9956-ffa450edef68
* apr_pools.c: In function `apr_pool_initialize':jwoolley2003-09-281-0/+1
| | | | | | | apr_pools.c:561: warning: implicit declaration of function `apr_atomic_init' git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64657 13f79535-47bb-0310-9956-ffa450edef68
* * misc/unix/start.cstriker2003-09-271-0/+14
| | | | | | | | | | | | | | | (apr_initialize): Remove atomics initialization from this function. Due to circular dependency, doing it here is too late. * memory/unix/apr_pools.c (apr_pool_initialize): Add atomics initialization to the release and debug versions. This has to happen here, since pools rely on mutexes, which can be backed by atomics. Atomics initialization requires a pool. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64655 13f79535-47bb-0310-9956-ffa450edef68
* axe these deprecated functions:trawick2003-09-031-57/+0
| | | | | | | | | | | | | | | | apr_allocator_get_mutex apr_allocator_get_owner apr_allocator_set_max_free apr_allocator_set_mutex apr_allocator_set_owner apr_pool_get_abort apr_pool_get_parent apr_pool_set_abort apr_pool_sub_make apr_signal_get_description git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64606 13f79535-47bb-0310-9956-ffa450edef68
* * memory/unix/apr_pools.cstriker2003-07-181-1/+1
| | | | | | | | | | | (apr_pool_create_ex): Use the correct mutex when adding the pool to the pools parent child list. Submitted by: Brad Nicholes, Jean-Jacques Clar <jjclar@novell.com> Reviewed by: Cliff Woolley, Sander Striker git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64572 13f79535-47bb-0310-9956-ffa450edef68
* Fixed a bug that could be triggered remotely through mod_dav and possibly otherjerenkrantz2003-05-281-1/+1
| | | | | | | | | | | | | | mechanisms, causing an Apache child process to crash. The crash was first reported by David Endler <DEndler@iDefense.com> and was researched and fixed by Joe Orton <jorton@redhat.com>. Details will be released on 30 May 2003. CVE: CAN-2003-0245 Reported by: David Endler <DEndler@iDefense.com> Submitted by: Joe Orton <jorton@redhat.com> Reviewed by: Justin, Jim, Jeff git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64511 13f79535-47bb-0310-9956-ffa450edef68
* * memory/unix/apr_pools.cstriker2003-03-071-1/+4
| | | | | | | (apr_pool_check_integrity): Only log when being verbose. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64406 13f79535-47bb-0310-9956-ffa450edef68
* As near as I can tell, Win32 will now correspond to Unix in terms of thewrowe2003-02-271-21/+6
| | | | | | | availability and lifetime of the hproc process handle. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64388 13f79535-47bb-0310-9956-ffa450edef68
* A silly little patch - the uses of 'pid' as the apr_proc_t* name are reallywrowe2003-02-271-12/+13
| | | | | | | confusing, proc is much more clearly not an actual int pid value. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64386 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright notices to 2003.thommay2003-01-011-1/+1
| | | | | | | No functional changes git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64251 13f79535-47bb-0310-9956-ffa450edef68
* Fix cleanups so cleanups actually get run when registered from within anotherstriker2002-11-191-11/+16
| | | | | | | cleanup. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64042 13f79535-47bb-0310-9956-ffa450edef68
* Fix a couple of logic bugs:stoddard2002-11-121-17/+19
| | | | | | | | | | 1. The previous code was missing the last sleep cycle, thus we would wait only half the time we should have been waiting. 2. We were incorrectly setting the need_timeout flag if pc->kill_how was not APR_KILL_AFTER_TIMEOUT git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64018 13f79535-47bb-0310-9956-ffa450edef68
* Update free_proc_chain timeout algorithm from a static 3 second timeoutstoddard2002-11-121-3/+36
| | | | | | | | | to an exponentiallly growing timeout. PR: 7617 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64016 13f79535-47bb-0310-9956-ffa450edef68
* Revert the apr_pool_userdata_get change from last night.rbb2002-10-221-4/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63965 13f79535-47bb-0310-9956-ffa450edef68
* Allow people who use userdata to distinguish between a successful retrievalrbb2002-10-221-2/+8
| | | | | | | | | from the pool userdata, and not being able to retrieve. We could also separate out when the hash doesn't exist, but I have left that for somebody else. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63959 13f79535-47bb-0310-9956-ffa450edef68
* Revert wrowes last commit and use casts instead.striker2002-10-051-3/+4
| | | | | | | | 'active->first_avail + size' might overflow, whereas 'active->endp - active->first_avail' can never underflow. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63894 13f79535-47bb-0310-9956-ffa450edef68
* Patch a compilation signedness emit... the difference of the memory ptrswrowe2002-09-291-3/+3
| | | | | | | | resulted in a ssize_t rather than the size_t we are comparing to. Change to addition and all is well. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63887 13f79535-47bb-0310-9956-ffa450edef68
* Fix pools to play nice with gcc bounds checking.striker2002-08-121-9/+5
| | | | | | | Submitted by: Blair Zajac <blair@orcaware.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63806 13f79535-47bb-0310-9956-ffa450edef68
* Detabbify previous commit... The offending party has been slapped on thestriker2002-07-131-7/+7
| | | | | | | wrists by the style police. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63655 13f79535-47bb-0310-9956-ffa450edef68
* Remove a bogus fixup from apr_vformatter, which made sure a NUL byte couldstriker2002-07-131-0/+23
| | | | | | | | | | | | | | | | | fit in by flushing if the final character was at the exact end of the buffer it was using. Take care of the case that the fixup was handling in apr_psprintf, by ensuring we can fit a NUL byte from the beginning. Implement this by calling flush if we start with a 0 byte buffer (in which nothing can fit anyway). Secondly make sure that the flush function never tries to use a block that has less than APR_PSPRINTF_MIN_STRINGSIZE bytes to spare. Thanks to Nuutti Kotivuori <naked@iki.fi> for pointing out the problem, digging around for answers and providing patches. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63654 13f79535-47bb-0310-9956-ffa450edef68
* use new time conversion macros in place of APR_USEC_PER_SECbrianp2002-07-051-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63566 13f79535-47bb-0310-9956-ffa450edef68
* Introduce a new symbolic constant, effectively eliminating a magicstriker2002-07-041-1/+4
| | | | | | | number. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63563 13f79535-47bb-0310-9956-ffa450edef68
* get rid of a warning (unreferenced static function) for some pool-debugtrawick2002-06-121-0/+2
| | | | | | | build flavors git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63498 13f79535-47bb-0310-9956-ffa450edef68
* move some deprecated functions inside a check for APR_HAS_THREADStrawick2002-06-101-0/+3
| | | | | | | so a non-thread-capable APR can build git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63486 13f79535-47bb-0310-9956-ffa450edef68
* Seems I was cutting a pasting just a little over the speed limit.wrowe2002-06-081-3/+3
| | | | | | | | | Thanks to Garrett for the fix. Submitted by: Garrett Rooney <rooneg@electricjellyfish.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63479 13f79535-47bb-0310-9956-ffa450edef68
* More API get/set renames, and providing stubs for those previouslywrowe2002-06-081-4/+58
| | | | | | | renamed without thunks. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63477 13f79535-47bb-0310-9956-ffa450edef68
* Move the apr_pool_allocator_get out of the #if !APR_POOL_DEBUG block.striker2002-05-301-5/+5
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63448 13f79535-47bb-0310-9956-ffa450edef68
* New function: apr_pool_allocator_get. This function allows us tostriker2002-05-301-0/+5
| | | | | | | | | | find out which allocator is being used by a pool. This is particularly usefull when you have created a pool with its own allocator, but don't want to keep a global pointer around to do tricks with its max free size or its mutexes. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63447 13f79535-47bb-0310-9956-ffa450edef68
* The style police patrols in a dimly lit alleyway...striker2002-05-301-9/+9
| | | | | | | Issued tickets for tabs and trailing whitespace. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63446 13f79535-47bb-0310-9956-ffa450edef68
* Fix the pool debug code. A pool clear destroys the pools mutex.striker2002-05-301-0/+31
| | | | | | | | | Make sure no other code uses the pools mutex while it is invalid. Tested by: Philip Martin <philip@codematters.co.uk> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63445 13f79535-47bb-0310-9956-ffa450edef68
* Renames:striker2002-05-301-13/+13
| | | | | | | | | | | | apr_allocator_set_owner -> apr_allocator_owner_set apr_allocator_get_owner -> apr_allocator_owner_get apr_allocator_set_mutex -> apr_allocator_mutex_set apr_allocator_get_mutex -> apr_allocator_mutex_get Suggested by: Cliff Woolley git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63444 13f79535-47bb-0310-9956-ffa450edef68
* Don't inline and export functions at the same time.striker2002-05-291-16/+24
| | | | | | | Submitted by: Branko Cibej <brane@xbc.nu> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63443 13f79535-47bb-0310-9956-ffa450edef68
* The 'reuse' patch. This will make pools a bit more carefull aboutstriker2002-05-261-30/+149
| | | | | | | | | | | | | when it has to allocate a new block from the allocator. If it has an old block which can hold the allocation it allocates from that and makes it the active block. See: <86off8rtmp.fsf@kepler.ch.collab.net> for why we need it. And: <1022371367.23007.13.camel@mypc1.pacbell.net> for a benchmark showing it doesn't affect httpd performance. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63436 13f79535-47bb-0310-9956-ffa450edef68
* The hi free patch. This will add the ability for a developer tostriker2002-05-261-2/+54
| | | | | | | | | | | set a maximum on the free blocks in an allocators freelist. See: <86off8rtmp.fsf@kepler.ch.collab.net> for why we need it. And: <1022371367.23007.13.camel@mypc1.pacbell.net> for a benchmark showing it doesn't affect httpd performance. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63435 13f79535-47bb-0310-9956-ffa450edef68
* Since we're using -Wmissing-prototypes, we were getting this warning:jwoolley2002-05-051-0/+1
| | | | | | | | | | | | | | apr_pools.c:584: warning: no previous prototype for `apr_pcalloc' Normally this prototype would go in the header, but it was explicitly removed from the header because code built today should not use this function. Its non-macro implementation only exists for binary backward compatibility. So as long as we export the symbol correctly, the pre-built code already knows how to pull it in (because this prototype WAS in the header when that code was built), so all is well with the world. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63362 13f79535-47bb-0310-9956-ffa450edef68
* Convert apr_pcalloc to a macro to take advantage of compilerbrianp2002-05-051-0/+8
| | | | | | | optimization of fixed-size memset calls git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63357 13f79535-47bb-0310-9956-ffa450edef68
* Add .deps to cvsignore since APR may now generate .deps files.jerenkrantz2002-04-221-0/+1
| | | | | | | (somehow CVS ignored updating these on the last commit.) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63287 13f79535-47bb-0310-9956-ffa450edef68
* Allow VPATH builds to properly generate build dependencies. This requiresjerenkrantz2002-04-221-0/+2
| | | | | | | | | | | | srcdir to always be available in a Makefile, so we need to stop adding this only when we use VPATH. Change the dependency generation to use .deps instead of appending to the Makefile. This makes us consistent with the dependency style of httpd-2.0. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63286 13f79535-47bb-0310-9956-ffa450edef68
* Minor tweaks to expose things in the apr_allocator API needed to implementjwoolley2002-04-011-18/+5
| | | | | | | the bucket allocator in apr-util git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63209 13f79535-47bb-0310-9956-ffa450edef68
* Fix a logic bug.striker2002-03-311-1/+1
| | | | | | | Submitted by: Cliff Woolley git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63208 13f79535-47bb-0310-9956-ffa450edef68
* Fix the fix...striker2002-03-191-7/+9
| | | | | | | | | apr_allocator_destroy wasn't the one using the invalid lock, it was apr_allocator_free, which was being called a few lines above my previous fix. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63157 13f79535-47bb-0310-9956-ffa450edef68
* Tag the apr global poolstriker2002-03-191-0/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63156 13f79535-47bb-0310-9956-ffa450edef68