summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/server
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-01-09 03:39:08 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-01-09 03:39:08 +0000
commit2e9c610931b4e0a6bab25b1fe5dbd0def45ee126 (patch)
tree1c740e32afcfc6570b5e87d179c12854ea4f686c /sca-cpp/trunk/modules/server
parentd2a4018d6c354a75e45800f90f45d09469bc4db5 (diff)
Fix memory leak in Python runtime integration. Reduce memory consumption of debug trace functions. Add trace points to help track the lifecycle of some of the runtime context objects.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1056880 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/server')
-rw-r--r--sca-cpp/trunk/modules/server/mod-eval.hpp2
-rw-r--r--sca-cpp/trunk/modules/server/mod-wiring.cpp8
2 files changed, 8 insertions, 2 deletions
diff --git a/sca-cpp/trunk/modules/server/mod-eval.hpp b/sca-cpp/trunk/modules/server/mod-eval.hpp
index 8dac21de04..4ee40e51ee 100644
--- a/sca-cpp/trunk/modules/server/mod-eval.hpp
+++ b/sca-cpp/trunk/modules/server/mod-eval.hpp
@@ -628,7 +628,9 @@ int handler(request_rec *r) {
if(strcmp(r->handler, "mod_tuscany_eval"))
return DECLINED;
+ // Create a scoped memory pool
gc_scoped_pool pool(r->pool);
+
ScopedRequest sr(r);
httpdDebugRequest(r, "modeval::handler::input");
diff --git a/sca-cpp/trunk/modules/server/mod-wiring.cpp b/sca-cpp/trunk/modules/server/mod-wiring.cpp
index 0ab61f5af8..b63cd3fb37 100644
--- a/sca-cpp/trunk/modules/server/mod-wiring.cpp
+++ b/sca-cpp/trunk/modules/server/mod-wiring.cpp
@@ -310,8 +310,10 @@ int translate(request_rec *r) {
if (!strncmp(r->uri, "/components/", 12))
return DECLINED;
- // Get the server configuration
+ // Create a scoped memory pool
gc_scoped_pool pool(r->pool);
+
+ // Get the server configuration
const ServerConf& sc = httpd::serverConf<ServerConf>(r, &mod_tuscany_wiring);
// Process dynamic virtual host configuration
@@ -346,8 +348,10 @@ int handler(request_rec *r) {
if (r->status == HTTP_MOVED_TEMPORARILY)
return OK;
- // Do an internal redirect
+ // Create a scoped memory pool
gc_scoped_pool pool(r->pool);
+
+ // Do an internal redirect
httpdDebugRequest(r, "modwiring::handler::input");
debug(r->uri, "modwiring::handler::uri");