diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llcommon/llapr.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
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() | |||
73 | } | 73 | } |
74 | 74 | ||
75 | // | 75 | // |
76 | //LLAPRPool | ||
77 | // | ||
78 | LLAPRPool::LLAPRPool(apr_pool_t *parent, apr_size_t size) | ||
79 | { | ||
80 | mStatus = apr_pool_create(&mPool, parent); | ||
81 | |||
82 | if(size > 0) //size is the number of blocks (which is usually 4K), NOT bytes. | ||
83 | { | ||
84 | apr_allocator_t *allocator = apr_pool_allocator_get(mPool); | ||
85 | if (allocator) | ||
86 | { | ||
87 | apr_allocator_max_free_set(allocator, size) ; | ||
88 | } | ||
89 | } | ||
90 | } | ||
91 | |||
92 | LLAPRPool::~LLAPRPool() | ||
93 | { | ||
94 | apr_pool_destroy(mPool) ; | ||
95 | } | ||
96 | |||
97 | // | ||
76 | // LLScopedLock | 98 | // LLScopedLock |
77 | // | 99 | // |
78 | LLScopedLock::LLScopedLock(apr_thread_mutex_t* mutex) : mMutex(mutex) | 100 | LLScopedLock::LLScopedLock(apr_thread_mutex_t* mutex) : mMutex(mutex) |