Deepend 3.2 Storage Pools

There’s a whole slew of updates and fixes in the latest release of Brad Moore’s Deepend storage pools package:

  • Ada 95 versions of the packages added.
  • Added Bounded forms for all the storage pool types.
  • Added exception handling, and allowed scoped subpools to not be allocated from the heap.
  • Storage_Size call fixed to match description in the Ada Standard. It is supposed to return the size of all storage allocated, including free storage and used storage. Previously, Deepend was reporting the amount of used storage. Instead, a new call, Storage_Used exists, which now reports the amount of used storage.
  • Scoped subpools are no longer created by the Create_Subpool call. Instead they are just declared with appropriate discriminants.
  • Fix bug with deallocation subpools, which needed to call the base class, but then ensure not calling back into the protected object, which caused hanging.
  • Added accessibility check suppressions for Ada 2012 test code.
  • Split source into three folders for Ada 95, Ada 2005, and Ada 2012.
  • Removed assertions that the size of the allocation had to be <= the size of the block size. This restriction was unnecessary, as the code will allocate a larger block if necessary to accommodate the request.
  • Added portability restrictions to Ada 2012 version of the code.
  • Removed non-portable use of System.Task_Info package.
  • Moved pragma Precondition and Postcondition for Ada 2005 version to body as portable assertions.
  • Removed compile time warnings that were incorrect or no longer needed.

Wheeev, Brad’s been very busy!

If you’re looking for a storage pool package with subpool capabilities, why not go and download Deepend and give it a whirl?

You can read the full release announcement here.

Deepend 3.0 Available for Ada 2012 and Ada 2005

Brad Moore just announced the release of Deepend 3.0, but before we get into what Deepend actually is, I’d like to start with this awesome explanation behind the name:

  1. Its the end of the pool you’d expect to go to, if the pool is to have subs floating in it.
  2. Hopefully it can be used to write deependable software.
  3. Hopefully it doesn’t mean this is something the author has gone off of.

Those three reasons are good enough for me, and with the name out the way, lets move on to tackle the big question of “what exactly is Deepend?”

Deepend is a dynamic storage pool with Subpool capabilities for Ada 2005 and Ada 2012 where all the objects in a subpool can be reclaimed all at once, instead of requiring each object to be individually reclaimed one at a time. A Dynamic Pool may have any number of subpools. If subpools are not reclaimed prior to finalization of the pool, then they are finalized when the pool is finalized.

Rather than deallocate items individually which is error prone and subceptable to memory leaks and other memory issues, a subpool can be freed all at once automatically when the pool object goes out of scope.

Have you ever wondered why Deallocating in Ada is called Unchecked_Deallocation, or why Ada has a new operator, but not a delete operator?

Part of the reason is that Ada was designed with safety in mind, and heap deallocations are viewed as error prone as it is in many languages.

With this Storage pool, Unchecked_Deallocation is implemented as a No-Op (null procedure), because it is not needed or intended to be used.

Subpool based storage management provides a safer means of memory management, which can outperform other mechanisms for storage reclamation including garbage collection.

So there you have it, straight from the horse’s mouth.

You can read the full release announcement here or you can just go straight to download and get busy with your subs immediately.

Deepend 2.6 for GNAT and ICC Ada 2005 compilers

Deepend is an efficient and safer form of storage management for Ada

2005 that can outperform garbage collection schemes. When I last reported on Deepend it was a binding to the Apache Runtime Pools implementation. This is no longer the case:

When Deepend was first announced, it was a binding to the Apache run time pool library. Since then, the Apache library has been removed as a dependency, and Deepend is now 100% pure Ada. Testing has shown that the new version of Deepend runs noticeably faster than the earlier version that called out to the Apache library.

But there’s more: Deepend now also compiles using the Irvine ICC Ada compiler and it has been tested using GNAT AUX on an Android Samsung Galaxy S II Smart phone.

Awesome work from Brad Moore.

You can read the full, and very comprehensive, release announcement here.

Deepend – A storage pool for Ada 2005

I’m a bit late to the game with this, but you know what they say: Better late than never.

From the crafty hands of Brad Moore we get a nice Ada binding to the Apache Runtime Pools implementation. Brad calls his binding Deepend.

Deepend is a storage pool with Subpool capabilities for Ada 2005 where all the objects in a subpool can be reclaimed all at once, instead of requiring each object to be individually reclaimed one at a time. Subpools may be completely independent pools, or they may be chained together in order to extend the lifetime of child pools to that of the lifetime of the root parent pool. Deepend is a binding to the Apache Runtime Pools implementation. Rather than deallocate items individually which is error prone and subceptable
to memory leaks and other memory issues, a subpool can be freed all at once automatically when the pool object goes out of scope. In addition, the pool may be reclaimed multiple times before the end of its lifetime through an explicit call to Unchecked_Deallocate.

You can read Brad’s full release announcement here, and in case you’re wondering about the name of the binding, there’s also a nice explanation for that:

  1. A pool has to be pretty deep if it is to have subs floating in it.
  2. Hopefully it can be used to write deependable software.
  3. Hopefully it doesn’t mean this is something the author has gone off of.

Those are, IMHO, all very good reasons. Go check it out.