mirror of
https://github.com/rvtr/ctr_eFuse.git
synced 2025-11-02 00:11:04 -04:00
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_eFuse@176 ff987cc8-cf2f-4642-8568-d52cce064691
46 lines
900 B
C
46 lines
900 B
C
/*
|
|
* my_hsm_alloc.c
|
|
*/
|
|
|
|
#include <assert.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <ctype.h>
|
|
#include <limits.h>
|
|
|
|
#include "nfastapp.h"
|
|
#include "nfutil.h"
|
|
#include "my_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 );
|
|
}
|