incubator-celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r792724 - /websites/staging/celix/trunk/content/celix/documentation/memorypools.html
Date Fri, 15 Jul 2011 08:59:32 GMT
Author: buildbot
Date: Fri Jul 15 08:59:32 2011
New Revision: 792724

Log:
Staging update by buildbot

Added:
    websites/staging/celix/trunk/content/celix/documentation/memorypools.html

Added: websites/staging/celix/trunk/content/celix/documentation/memorypools.html
==============================================================================
--- websites/staging/celix/trunk/content/celix/documentation/memorypools.html (added)
+++ websites/staging/celix/trunk/content/celix/documentation/memorypools.html Fri Jul 15 08:59:32
2011
@@ -0,0 +1,155 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+    <link rel="stylesheet" type="text/css" 
+               href="http://yui.yahooapis.com/2.8.1/build/reset-fonts-grids/reset-fonts-grids.css">
+    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.1/build/base/base-min.css">
+    <link rel="stylesheet" type="text/css" href="/celix/css/superfish.css" media="screen">
+    <!--  link rel="stylesheet" type="text/css" href="/celix/css/BreadCrumb.css" media="screen"
 -->
+    <link rel="stylesheet" type="text/css" href="/celix/css/celix.css">
+    <link rel="stylesheet" type="text/css" href="/celix/css/pygments.css">
+    
+  
+  <title>Apache Celix - Memory Pools</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  
+  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
+  <script type="text/javascript" src="/celix/js/jquery.gradient.js"></script>
+  <script type="text/javascript" src="/celix/js/jquery.dimensions.js"></script>
+  <script type="text/javascript" src="/celix/js/jquery.hoverIntent.js"></script>
+  <script type="text/javascript" src="/celix/js/superfish.js"></script>
+  <script type="text/javascript" src="/celix/js/supersubs.js"></script>
+  <!-- script type="text/javascript" src="/celix/js/jquery.easing.1.3.js"></script>
+  <script type="text/javascript" src="/celix/js/jquery.jBreadCrumb.1.1.js"></script-->
+  <script type="text/javascript"><!--
+        // initialize plugins
+        jQuery(function() {
+        	jQuery('#navbar ul:first').addClass('sf-menu');
+            //Nav bar: Supersubs dropdown menus
+            jQuery('#navbar ul:first').supersubs({extraWidth: 1}).superfish({animation:{opacity:0.97,height:'show'}});
+        });
+  
+        //jQuery(document).ready(function() {
+		//      jQuery("#breadCrumb").jBreadCrumb();
+		//  })
+    --></script>
+</head>
+
+<body>
+    <div id="page">
+        <div id="header">
+            <a href="/celix/index.html"><img id="headerimage" src="/celix/images/celix.png"
alt="Apache Celix" 
+                    height="130px"></a>
+            <div id="navbar"> 
+                <ul>
+<li><a href="/celix/index.html">Home</a></li>
+<li><a href="/celix/celix.html">About</a><ul>
+<li><a href="/celix/celix.html">Celix</a></li>
+<li><a href="/celix/background.html">Background</a></li>
+</ul>
+</li>
+<li><a href="/celix/documentation.html">Documentation</a><ul>
+<li><a href="/celix/documentation/buildingandrunning.html">Building and Running</a></li>
+<li><a href="/celix/documentation/design.html">Design</a></li>
+<li><a href="/celix/documentation/examples.html">Examples</a><ul>
+<li><a href="/celix/examples/helloworld.html">Hello World Example</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="/celix/download.html">Download</a></li>
+<li><a href="/celix/community/community.html">Community</a><ul>
+<li><a href="/celix/community/contributing/contributing.html">Contributing</a></li>
+<li><a href="/celix/community/boardreports/boardreports.html">Board Reports</a></li>
+</ul>
+</li>
+<li><a href="/celix/support/support.html">Support</a><ul>
+<li><a href="/celix/support/mailinglist.html">Mailing List</a></li>
+<li><a href="/celix/support/issuetracking.html">Issue Tracking</a></li>
+</ul>
+</li>
+</ul>
+            </div>
+		    <!-- div id="breadCrumbHolder" class="module">
+		        <div id="breadCrumb" class="breadCrumb module">
+		            <ul>
+		                
+		            </ul>
+		        </div>
+		    </div-->
+        </div>
+  
+        <div id="center">
+            <div id="main">
+                <div id="homecenter">
+                    <div id="homeleft">
+                        <h1 class="title">Memory Pools</h1>
+                        <p>Celix uses the <a href="http://apr.apache.org">Apache
Portable Runtime</a> (APR) as abstraction layer for platforms. APR uses memory pools
to make memory management easier. To be able to use memory pools the lifetime of "objects"
must be known.</p>
+<p>This page details how Celix user APR memory pools and what the lifetime of objects
within Celix is. This will result in some best practices that should be followed when using
APR.</p>
+<p>Roughly, within Celix, the following object groups can be identified, where each
object has its own memory pool:</p>
+<ul>
+<li>
+<p>The framework </p>
+<p>The framework runs as long as the application and thus has the longest lifetime
(if Celix is not embedded). The memory pool of the framework contains all objects belonging
to the framework, for example the service registry etc.</p>
+</li>
+<li>
+<p>Installed bundles</p>
+<p>For each bundle that is installed a new memory pool is created. This memory pool
is active until the bundle is uninstalled. On this pool the metadata of the bundle is allocated,
as well as other static aspects.
+The bundle pool is a child pool of the framework pool.</p>
+</li>
+<li>
+<p>Active bundles</p>
+<p>If a bundle is started a new pool is created. This pool is used for all runtime
aspects of the bundle, the bundle context, the loading of the library etc. A reference to
this pool is also kept in the bundle context so that it can be used in the activator (and
component). This pool is cleared and destroyed if the bundle is stopped.
+The active bundle pool is a child pool of the bundle pool.</p>
+</li>
+<li>
+<p>User invocation</p>
+<p>During the lifetime of a bundle it is often needed to request information from the
framework. If this invocation is only needed once, the pool from the bundle context can be
used, but most likely invocations have to be repeated. To prevent a growing pool, for each
invocation the caller has to supply a memory pool on which the request has to be allocated.
+It is up the caller to determine the life time of a request, and destroy the pool if it is
no longer needed.
+To be sure all user pools are cleared, the active bundle pool should be used as parent. This
guarantees all user pools will be destroyed if the bundle is stopped.</p>
+</li>
+</ul>
+<p>The following diagram roughly depicts the state of a bundle and what pool must be/is
used for that state.</p>
+<p><img alt="alt text" src="memory_pools.png" /></p>
+                    </div>
+                    <div id="homeright">
+                        
+                        
+                        
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+  
+    <div id="footer">
+        <div class="copyright">
+            <p>
+                Copyright &copy; 2011 The Apache Software Foundation, Licensed under

+                the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License,
Version 2.0</a>.
+                <br />
+                Apache and the Apache feather logo are trademarks of The Apache Software
Foundation.
+            </p>
+        </div>
+    </div>
+</div>
+</body>
+</html>



Mime
View raw message