/* * my_hsm_alloc.c */ #include #include #include #include #include #include #ifdef USE_HSM #include "nfastapp.h" #include "nfutil.h" #include "cr_hsm_alloc.h" /* --------------------- */ const NFast_MallocUpcalls my_hsm_malloc_upcalls = { my_hsm_malloc, my_hsm_realloc, my_hsm_free }; /* --------------------- */ void *my_hsm_malloc( size_t nbytes, struct NFast_Call_Context *cctx, struct NFast_Transaction_Context *tctx ) { return malloc( nbytes ); } /* --------------------- */ void *my_hsm_realloc( void *ptr, size_t nbytes, struct NFast_Call_Context *cctx, struct NFast_Transaction_Context *tctx ) { return realloc( ptr, nbytes ); } /* --------------------- */ void my_hsm_free( void *ptr, struct NFast_Call_Context *cctx, struct NFast_Transaction_Context *tctx ) { free( ptr ); } #endif // HSM