Archive

Archive for the ‘Dynamic memory allocation’ Category

Dynamic Memory Software Updated

February 29th, 2012 No comments

After a bit of a lull, I have resumed work in earnest on what will become, I hope, a useful and fairly comprehensive C++ software library for embedded and real-time developers. To begin with, I am updating the Dynamic Memory Classes which I first published on this blog about two years ago. The first instalment – the “Pooled” class and its ancillaries – is now available for subscribers to download. Just go to the Subscribers page and follow the guidance there in order to get hold of the software.

I publicised the software yesterday on LinkedIn and it is apparent that some of you have downloaded it already. Please check that you really do have the latest version (28 February 2012). Having successfully downloaded it myself yesterday evening, I was dismayed to find that I got an older version when I tried again this morning! I don’t what caused that, but I’ve fixed it now and the old versions have been completely removed from this site.

Some time ago, I blogged about a problem I had with these classes in statically allocating the pools. I temporarily fixed this with a one-off dynamic allocation for each pool when it was first used. I was never happy with that and I’m pleased to say that I have solved the problem properly now. Consequently, the pools are now statically allocated, as was always the intention, and the “Pooled” facility (one pool per class) operates completely independently of “MemSpace”, which is another part of the class library to be incorporated in the next update, quite soon.

Those of you who are mystified by all of this, please browse the “Dynamic Memory” section of this blog. Better still, subscribe to the blog and download the software. This version is comprehensively documented and it comes with its own Demo program, which you can run natively on the desktop or cross-compile and run on an embedded target using a suitable IDE, such as IAR’s.

Enjoy!

New version of dynamic memory software for C++

May 9th, 2010 3 comments

Since Easter, when I promised a new release of this software, I’ve been exceptionally busy in a money-earning sort of way. I’ve noticed that others are blogging less now that their business has (presumably) picked up, so I’m not alone in disappointing my readers, but that is no excuse and so I have just uploaded the software I promised. Read more…

Free software: thwarted by g++

March 8th, 2010 No comments

The free software you may have downloaded from this site embodies an error of principle (details another time). It compiles with VC++ and IAR (ARM), and the code is correct and runs properly. However, I tried g++ today and it was less forgiving. Unfortunately, it’s right and I’m wrong, even though I got away with it up to now. I’m working on a fix and will post again when I have finished it.

Free software updated

February 4th, 2010 No comments

The C++ dynamic memory software I published last week has been updated with a small but useful enhancement.

Find out more by downloading it: start by going to the Subscribers’ page.

Free software!

January 28th, 2010 No comments

For the last couple of months, my software efforts have been diluted by the need to attend to other matters no less important but somewhat distracting. Now I have finally released some software. It is not the whole of SKC++, though. I learned so many things, at a detailed level (mainly about C++), in developing SKC++ that I realised that I had built “one to throw away”, as the saying goes.  The refactoring is well underway and I have decided initially to release some of the essential elements of SKC++ in stages, as library modules which can be used more generally Read more…

SKC++: Dynamic Memory Classes

September 30th, 2009 2 comments

Following on from previous postings, here is a UML diagram showing two classes concerned with dynamic memory handling: Read more…

SKC++ and Dynamic Memory

September 14th, 2009 1 comment

Today’s post is about the strategy of dynamic memory handling in SKC++.

Last time, I recommended a short slide presentation for perusal. I will not repeat here what that says, except to quote the last slide:

Preventing fragmentation
• Always use pools, never heaps
– Exception: memory which is never intended to be freed can be taken from a heap
• Override the global new() and delete() operators
• Consider per-class new() and delete() operators
– Quicker, as well as safer

In a nutshell, that is the strategy for SKC++. Read more…

Dynamic Memory Allocation

September 10th, 2009 No comments

Today, I am working on the dynamic allocation scheme for SKC++. It’s very simple (as everything is supposed to be in SKC++), so it won’t be long before I post again, reporting on progress.

In the meantime, if you’re wondering what’s wrong with using the standard new and delete mechanisms that come with C++ I urge you to have a look at my short slide presentation on the subject. The last two slides are particularly important.

Till soon…