Allocating memory can be slow if it is done a lot in a multi-threaded
environment using the RTL memory allocator. This allocator replaces the
built in one speeding up memory allocations, at the cost of a small amount
of extra memory consumed.
All the proceeds from the sale of this product go to charity. If you would
like a free copy please send us an email requesting one and we'll be happy
to give one to you.
- Replaces the Clarion RTL Memory Allocator (Malloc) with an alternative
- The Fastmem allocator requires no thread locks, so performs faster when
used in a multi-threading environment.
- Affects NEW, Queues, Memory File Driver and classes which NEW things
- Particularly good for Web Services programs built using NetTalk and
As more people use Fastmem in a variety of environments, we are getting lots of helpful feedback on cases
which are not currently supported. We will investigate these and update this list as we encounter these.
- Add Global Extension
- Set the properties as you wish. See the Template Reference for a list of properties and what they do.
If you have a multi-dll system (ie multiple apps) then you only need to add this template to the DataDLL app. ie the app which contains the
If you have a hand-coded project, and you wish to include Fastmem, then you need to duplicate the functionality of the template
in the application by hand. Fortunately this is very easy to do;
As early as possible in the code, add the following declaration;
This should be done inside the first module that is loaded (probably the Exe
in cases where you are dynamically loading the DLL's, or in the first DLL -
sometimes called the Data-DLL - in systems which load multiple DLL's at load
You can turn the new allocator on and off (at compile time) by adjusting the
equates at the top of fastmem.inc
You may also choose to comment out the two equates altogether and instead
declare these equates as Conditional Compile options in your project
File Manager Tab
The default value for this is ON. If this is on then the buggy ASSERT when CLOSE is called is suppressed.
Create SQL Tables
The default value for this is OFF. If this is ON then a CREATE will be called for SQL tables which
have an error on OPEN. Note that if you are using File Manager 3 then this setting should still be set to
FM3 will correctly create the tables when required - and only when required.
Your questions, comments
and suggestions are welcome. See our web page (www.capesoft.com
for new versions. You can also contact us in one of the following ways:
||+27 21 715 4000
||+27 21 715 2535
PO Box 511, Plumstead, 7801, Cape Town, South Africa
To download the latest installation please visit
To install extract the Installation Program from the SAF file
using the free CapeSoft Safe Reader (download for free from
Run the Installation Program for your version of Clarion.
There are no files to distribute.
License & Copyright
This template is copyright © 2015 by CapeSoft Software.
None of the included files may be distributed. Your programs
which use Fastmem can be distributed without any Fastmem royalties.
This product includes code copyright Dave Nichols and released under the MIT
This product is provided as-is. Use it entirely at your own risk. Use of this
product implies your acceptance of this, along with the recognition of the
copyright stated above. In no way will CapeSoft Software, their
employees or affiliates be liable in any way for any damages or business losses you may
incur as a direct or indirect result of using this product
Version 1.03 (23 December 2015)
Version 1.02 (17 December 2015)
- Fix: Bug causing
possible GPF when exceeding 4 gigs of Ram.
- Internal: Do a bit of rationalization in prep for doing some parts
- Internal: zdMemTrimSlabs
Version 1.01 (14 December 2015)
- Add: Support for
local mode compiles.
- Changed name of class from fmPatchProcess to FastMemClass
- Changed the name of the object from fmpp to Fastmem
- Added new methods to class, will be used to call Command functions
- new function: zdMemClearStats
- changed text for panic messages.
- Allow for a length which is not a multiple of the alignment size
("Program was given a bad alignment" error)
- Deprecated MallocIsRTL project define / equate
Version 1.0 (11 December 2015)
- Fastmem.clw and
Fastmem.inc in the build were out of date.
Download latest version