Difference between revisions of "CMem"

From Lazarus wiki
Jump to navigationJump to search
m
Line 2: Line 2:
 
<br />
 
<br />
 
<br />
 
<br />
If you include the '''cmem''' unit, it will replace the native Free Pascal memory manager with the C library memory manager. All memory management is done by the C memory manager when the cmem is package is included in the uses clause of your program. The unit should be the first unit in the uses clause, otherwise memory can already be allocated by initialization routines in units that are initialized before the C memory manager is installed.   
+
If you include the '''cmem''' unit in your uses clause of your program, it will replace the native Free Pascal memory manager with the C library memory manager. All memory management is then done by the C memory manager.
 +
 
 +
The unit should be the first unit in the uses clause, otherwise memory can already be allocated by initialization routines in units that are initialized before the C memory manager is installed.   
  
 
There is a small example program '''testcmem''', which demonstrates the use of the cmem unit.
 
There is a small example program '''testcmem''', which demonstrates the use of the cmem unit.
  
Go to back [[Package_List|Packages List]]
+
Go back to [[Package_List|Packages List]]
  
 
[[Category:Standard Units]]
 
[[Category:Standard Units]]
 +
[[Category:Packages]]

Revision as of 11:57, 5 September 2014

Deutsch (de) English (en)


If you include the cmem unit in your uses clause of your program, it will replace the native Free Pascal memory manager with the C library memory manager. All memory management is then done by the C memory manager.

The unit should be the first unit in the uses clause, otherwise memory can already be allocated by initialization routines in units that are initialized before the C memory manager is installed.

There is a small example program testcmem, which demonstrates the use of the cmem unit.

Go back to Packages List