apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Zhakov <i...@visualsvn.com>
Subject [PATCH] Use dedicated Windows heap for each apr_allocator_t
Date Tue, 12 Jul 2011 15:20:16 GMT
Hi,

Please find attached patch that adds an option
(APR_ALLOCATOR_USE_WIN32_HEAP) to use dedicated Windows heap for each
apr_allocator_t. Using dedicated heaps for APR allocator should reduce
memory fragmentation for mutli-thread application like Apache HTTPD on
Windows.

Log message:
[[[
* memory/unix/apr_pools
  (apr_allocator_t): Add heap member if APR_ALLOCATOR_USE_WIN32_HEAP is defined.
  (apr_allocator_create): Create Windows heap if
APR_ALLOCATOR_USE_WIN32_HEAP is defined.
  (apr_allocator_destroy): Destroy dedicated heap if
APR_ALLOCATOR_USE_WIN32_HEAP is defined. All unfreed memory
  will be destroyed automatically.
 (allocator_alloc): Use HeapAlloc if APR_ALLOCATOR_USE_WIN32_HEAP is defined.
 (apr_pool_create_unmanaged_ex): Use apr_allocator_create() to create
apr_allocator_t instance if
  APR_ALLOCATOR_USE_WIN32_HEAP is defined
]]]

-- 
Ivan Zhakov

Mime
View raw message