Memory Management

Memory Management

Crypto-C provides memory management routines that perform memory allocation (T_malloc, T_realloc and T_free) and memory operations (T_memcmp, T_memcpy, T_memmove, and T_memset). These functions are modeled after conventional C library functions such as malloc, memset, etc. If you want to use the Crypto-C memory- management functions, you must link in the tstdlib.c file when you build your application.

You can also supply your own versions of these functions if, for example, you need platform-specific routines. In this case, you link to your application both your memory-management functions and the Crypto-C library. Crypto-C will use these statically linked functions in place of its memory management routines.

The BDEMO demonstration application provides a sample implementation of these functions. See “Details of Crypto-C Functions” on page 289 for descriptions and prototypes of these functions.

4

R S A B S A F E C r y p t o - C L i b r a r y R e f e r e n c e M a n u a l

Page 14
Image 14
RSA Security 5 manual Memory Management