Is Smartheap relevant anymore?

Our current product uses SmartHeap memory Manager which has been in the product since 1999.
With memory being abundant and cheap / harddisks being faster and new Windows Operating systems memory management is SmartHeap really needed anymore?

The reason I am told it's still needed is to avoid excessive 'fragmentation'.

Is this still true with todays beefed up systems?


LVL 12
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

depends on your application whether it is still needed.

here's a quote from
"SmartHeap has multiplied our application server throughput by a factor of six on quad processor boxes."

williamcampbellAuthor Commented:
The App is a Windows application that is Single Threaded. It does allocate and free lot of small blocks of memory.
evilrixSenior Software Engineer (Avast)Commented:
>> It does allocate and free lot of small blocks of memory.
Well, most problems with memory fragmentation (for example) can be solved by writing code to handle memory allocation better. For example, rather than allocating many small blocks from the heap you can write a custom allocator and use in-place new. I develop huge scale data systems that have to be scalable in terms of performance and resource, we've never had a need to use such 3rd partly tools.

A good knowledge of how the standard C/C++ memory allocation systems work combined with a good knowledge of how your OS of choice manages its heap means you can write code that is scalable and efficient without spending (wasting) money on expensive 3rd party tools.

That said, if your code base has been specifically written to take advantage of SmartHeap that, to me, implies that is isn't necessarily designed to be efficient without it. This being the case, you'd have to invest some time, money and effort profiling and evaluating to ensure eradication of this tool left your application still being performant.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

The problem with memory fragmentation is that if you do not have enough contiguous virtual space that is mapped to physical memory, then you have to rely on disk virtual memory, which is significantly slower due to swapping memory content with disk contents. (Or, in some of my not-so-old systems, you just freeze if you don't have the contiguous physical memory - i.e., on disk-less systems - and as a result of trying to do too much, or just handling allocations poorly.) Well, you likely have significantly more virtual space than a decade ago, so I think it's a question of physical memory; unless you need well over  2GB virtual memory and only have a 32-bit platform and OS.

Are you using a 32-bit Operating System? You could upgrade to a 64-bit system. For details on Windows virtual memory see:
which in turn references the more expanded article:
(See Section 3 in this last link on 64 bit architecture/OS.)

Depending on the application(s) often adding a huge amount of extra memory greatly eliminates the need to deal with fragmentation issues, and memory managers; but it depends on how much virtual memory your system needs, and your performance requirements. Also, as a side-note, adding this physical memory can extend the life of your disk drives, again due to less swapping.
i would test with and without. if no sigificant differences drop it. if much better with smartheap you still may check whether that is only by making other apps slower.
What is the reason for your question ? Did you notice (performance) issues ? If so, which ones ? Do you want to save costs if possible ? Something else ?

Knowing the rationale for the auestion will allow us to give you more to-the-point answers.
williamcampbellAuthor Commented:
The reasons for the question:

1) If current OS memory management and memory size are optimal could Smartheap be actually slowing down the code?
2) Modern memory Profilers and Leak detectors cannot find some problems because Smartheap is masking them, although Smartheap has an API I'd rather use the new tools available.
3) When does Smartheap actually compact memory? As far as I can see it keeps allocating until you run out. With all that fragmentation shouldn't it auto compact at some stage. If it does, when? Not knowing makes me feel I'm out of control of my memory.
4) It's kind of embarrassing to admit we are using technology developed 11 years ago :)

Thanks again for the answers, helps a lot. I'll leave the question open for a bit longer then split the points.


evilrixSenior Software Engineer (Avast)Commented:
>> If current OS memory management and memory size are optimal could Smartheap be actually slowing down the code?
It is possible but the only way to be sure is to profile a before and after.
williamcampbellAuthor Commented:
Thanks. I'll post results of testing at a later date
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.