F.A.Q. (Frequently Asked Questions)
: What exactly is C Memory Scavenger? Does it find memory leaks, does it solves memory leaks like some kind of garbage collector in Java/C#, or both or what?
A: It is a bit of everything. By enabling the CMemScav library, all explicit memory allocations and deallocations in your source code, like: char *ptext = (char*)malloc(100); free(ptext);, are monitored by this library. This means that you can at any time ask the library what memory allocations you have for the moment by calling some functions in the library, from within your application. However, there is also a Windows program (which does not have to be run on the same computer) that can ask the library within the application about the memory status, and display the result graphically. In either way, you may track down memory leaks using the library and preferably also the program. In this way the tool is used for fining memory leaks. But there is also a second field of application - a kind of semi automatic garbage collection. Since the library saves all relevant information about all outstanding memory allocations, including the values of the memory pointers, it can also free whatever parts you like. A very flexible function in the library, CMemScavFreeThese(...), gives you the opportunity to free all or part of the outstanding memory allocations at any time. Although not as automatic as the garbage collection in Java/C#, it gives you the possibility to get rid of memory leaks without having to solve them the hard way, by finding out exactly where to put free() calls in the source code.
: Have you any demo code I can look into, to see how it works? Any compiled and linked versions of them, so I can run them directly, without having to struggle with compilation/linking?
: There are three fully functional demo code programs supplied with the installation. All threse are part of the Windows and Solaris development files and contain source code, compilation and link support as well as compiled and linked executables ready to be run directly under the respective platform. Two of these demo programs are Simple Example
and Advanced Example
: When I downloaded the whole product, I got a file named C_Memory_Scavenger_Setup.exe, but where are the Windows and Solaris development files?
: When you run this downloaded file under Windows, the Monitor
will be installed, normally at C:\Program\Matex Data HB\C Memory Scavenger
, or at C:\Program Files\Matex Data HB\C Memory Scavenger
. However, you can choose whatever place you want to install Monitor
at. At the same place where you choose to install this program, the development files CMemScav_WindowsDevelopment.zip
will be placed. Note that you may also download these files separately, see Download
: Do I have to install/use the Monitor program, or is it possible to use the CMemScav library only?
A: The Monitor is a powerful tool for tracing memory leaks as well as creating calls to the CMemScav library to automatically clear off outstanding memory allocations, without having to track down all leaks and figure out how to fix them. However, creating such calls to CMemScav may be done manually and both the summary and list of allocations in the Monitor, may be created by calls to CMemScav.
: Do I have to run the Monitor program on the same machine as where my application is running?
A: No, the Monitor program have to be run under Windows, but the application to be monitored can be run on the same or on a different computer, either under Windows or under Solaris. However, if run on different computers, they need to be connected to the same network (Internet, for example) and the IP address to the computer running the application should be entered into the Monitor. If the programs run on the same computer, the IP address 127.0.0.1 (local host) could be used.
: How does the registration work?
: The registration links
go to a company called "share*it!", which offers a secure on-line order process to buy licenses. There are a number of different payment alternatives, such as credit cards, bank/wire transfers, and checks for example. Within seconds from a fullfilled order, a license key is delivered via email. A license gives the buyer the rights to use both the Monitor
program and the CMemScav
library as well as adding this license key into possible products sold by the buyer. The only limitation is that the license key must not be revealed for any one, including possible customers of the buyer's products. Therefore, if the key is built into a product, the key must not be able to be extracted from it (without analyzing the executable).