Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 850
  • Last Modified:

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?

Discussion.

wc
0
williamcampbell
Asked:
williamcampbell
  • 3
  • 2
  • 2
  • +2
2 Solutions
 
phoffricCommented:
depends on your application whether it is still needed.

here's a quote from http://www.microquill.com/smartheapsmp/index.html
"SmartHeap has multiplied our application server throughput by a factor of six on quad processor boxes."

0
 
williamcampbellAuthor Commented:
The App is a Windows application that is Single Threaded. It does allocate and free lot of small blocks of memory.
0
 
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.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
phoffricCommented:
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:
     http://support.microsoft.com/kb/555223
which in turn references the more expanded article:
http://members.shaw.ca/bsanders/WindowsGeneralWeb/RAMVirtualMemoryPageFileEtc.htm
(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.
0
 
js-profiCommented:
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.
0
 
Infinity08Commented:
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.
0
 
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.

wc



0
 
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.
0
 
williamcampbellAuthor Commented:
Thanks. I'll post results of testing at a later date
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now