From d78e22887482056e9e29cccf2b7a8a675035d040 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 6 Sep 2008 18:27:37 -0500 Subject: Second Life viewer sources 1.21.1-RC --- linden/indra/llcommon/llapr.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'linden/indra/llcommon/llapr.cpp') diff --git a/linden/indra/llcommon/llapr.cpp b/linden/indra/llcommon/llapr.cpp index 73e715a..17c753d 100644 --- a/linden/indra/llcommon/llapr.cpp +++ b/linden/indra/llcommon/llapr.cpp @@ -73,6 +73,28 @@ void ll_cleanup_apr() } // +//LLAPRPool +// +LLAPRPool::LLAPRPool(apr_pool_t *parent, apr_size_t size) +{ + mStatus = apr_pool_create(&mPool, parent); + + if(size > 0) //size is the number of blocks (which is usually 4K), NOT bytes. + { + apr_allocator_t *allocator = apr_pool_allocator_get(mPool); + if (allocator) + { + apr_allocator_max_free_set(allocator, size) ; + } + } +} + +LLAPRPool::~LLAPRPool() +{ + apr_pool_destroy(mPool) ; +} + +// // LLScopedLock // LLScopedLock::LLScopedLock(apr_thread_mutex_t* mutex) : mMutex(mutex) -- cgit v1.1