[Ace-users] [ace-users] ACE_Service_Repository::instance (size_t size = ACE_Service_Repository::DEFAULT_SIZE )
Douglas C. Schmidt
schmidt at dre.vanderbilt.edu
Wed Dec 12 22:11:19 CST 2007
Hi,
Thanks for using the PRF.
>ACE VERSION: 5.5.10
>HOST MACHINE and OPERATING SYSTEM: winxp
>COMPILER NAME AND VERSION (AND PATCHLEVEL): g++
>THE $ACE_ROOT/ace/config.h FILE : #include "ace/config-win32.h"
>THE $ACE_ROOT/include/makeinclude/platform_macros.GNU
>FILE :platform_macros.GNU
>DESCRIPTION:
>I know in $ACE_ROOT/ace.there is:
>Default_Constants.h:
>#define ACE_DEFAULT_SERVICE_REPOSITORY_SIZE 1024
>
>I want to use
>if (ACE_Service_Repository::instance((size_t)1024*1024)->find(service,
>&svc_rec) == -1) {}
>set the maximum size of the ACE_Service_Repository.
>
>But it seems does not work?
Perhaps this isn't the first time that the instance() method is
called, in which case the initialization of the size won't get done.
I recommend you step into the debugger to see what's going on. You
might want to do something like this
ACE_Service_Repository sr (1024 * 1024);
ACE_Service_Repository *sp = ACE_Service_Repository::instance (&sr);
delete sp;
if (ACE_Service_Repository::instance ()->find (service, &svc_rec) == -1)
...
and see if that works better.
Thanks,
Doug
--
Dr. Douglas C. Schmidt Professor and Associate Chair
Electrical Engineering and Computer Science TEL: (615) 343-8197
Vanderbilt University WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203 NET: d.schmidt at vanderbilt.edu
More information about the Ace-users
mailing list