[ace-users] Objects returning themselves to a memory pool
Stew Paddaso
stew.paddaso at gmail.com
Tue Sep 25 15:29:10 CDT 2007
ACE VERSION : 5.5.1
HOST MACHINE and OPERATING SYSTEM:
i686, linux kernel 2.6 and WinXP
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
i686, PPC, MIPS
COMPILER NAME AND VERSION (AND PATCHLEVEL):
GCC 4.0.1 and VC9
THE $ACE_ROOT/ace/config.h FILE:
#include "ace/config-linux.h"
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE:
no_hidden_visibility=1
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
DESCRIPTION:
Our system is a C++ reference counted / interfaced-based system, and
we would like to create a MediaBuffer object that will automatically
return itself to a buffer pool when there are no further references to
it. Our thought was to use ACE_Dynamic_Cached_Allocator<MediaBuffer>
and pass a pointer to the allocator to the MediaBuffer. Then, when the
MediaBuffer object if released, it would call _allocator->free(this)
to return itself to the pool. I suspect this will work from what I've
read, but I want confirm this we those more knowledgeable than I.
Thanks.
More information about the Ace-users
mailing list