[Overview][Constants][Procedures and functions][Index] |
Memory manager replacement using the C memory manager
The cmem memory manager sets the system units memory manager to a C-based memory manager: all memory management calls are shunted through to the C memory manager, using Malloc, Free and ReAlloc. For this reason, the cmem unit should be the first unit of the uses clause of the program.
The unit also offers the C memory calls directly as external declarations from the C library, but it is recommended to use the normal FPC routines for this.
Obviously, including this unit links your program to the C library.
Remark: | Note that specifying the -gv command-line option, to enable valgrind debugging info will implicitly add this unit to your program. |