- Add ND_DataStruct_Alloc() & ND_DataStruct_Free() to help memory allocation inside a manager.
This commit is contained in:
@@ -2202,6 +2202,78 @@ NDT_Status ND_DataStruct_Info_Print_C( FILE *Out, NDT_Root *Root_Ptr, NDT_Rec
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Alloc memory unsing data structure allocator - Manager function */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* (O) Memory_Ptr_Ptr: Memory pointer address */
|
||||
/* (I) Root_Ptr: Data structure pointer */
|
||||
/* (I) Size: Allocation size */
|
||||
/* (I) Data_Ptr: User pointer */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
NDT_Status ND_DataStruct_Alloc_I( void **Ptr_Ptr, NDT_Root *Root_Ptr, size_t Size, void *Data_Ptr)
|
||||
{
|
||||
return( ND_Allocator_Exec_I( Ptr_Ptr, Root_Ptr, Size, Root_Ptr->Allocator_Name, Root_Ptr->Allocator_Ptr, Data_Ptr));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Alloc memory unsing data structure allocator - Manager function */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* (O) Memory_Ptr_Ptr: Memory pointer address */
|
||||
/* (I) Root_Ptr: Data structure pointer */
|
||||
/* (I) Size: Allocation size */
|
||||
/* (I) Data_Ptr: User pointer */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
NDT_Status ND_DataStruct_Alloc_C( void **Ptr_Ptr, NDT_Root *Root_Ptr, size_t Size, void *Data_Ptr)
|
||||
{
|
||||
return( ND_Allocator_Exec_I( Ptr_Ptr, Root_Ptr, Size, Root_Ptr->Allocator_Name, Root_Ptr->Allocator_Ptr, Data_Ptr));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Free memory unsing data structure allocator - Manager function */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* (I) Memory_Ptr: Memory pointer */
|
||||
/* (I) Root_Ptr: Data structure pointer */
|
||||
/* (I) Data_Ptr: User pointer */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
NDT_Status ND_DataStruct_Free_I( void *Ptr, NDT_Root *Root_Ptr, void *Data_Ptr)
|
||||
{
|
||||
return( ND_Deallocator_Exec_I( Ptr, Root_Ptr, Root_Ptr->Deallocator_Name, Root_Ptr->Deallocator_Ptr, Data_Ptr));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Free memory unsing data structure allocator - Manager function */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* (I) Memory_Ptr: Memory pointer */
|
||||
/* (I) Root_Ptr: Data structure pointer */
|
||||
/* (I) Allocator_Name: Value deallocator function name */
|
||||
/* (I) Allocator_Ptr: Value deallocator function pointer */
|
||||
/* (I) Data_Ptr: User pointer */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
NDT_Status ND_DataStruct_Free_C( void *Ptr, NDT_Root *Root_Ptr, void *Data_Ptr)
|
||||
{
|
||||
return( ND_Deallocator_Exec_I( Ptr, Root_Ptr, Root_Ptr->Deallocator_Name, Root_Ptr->Deallocator_Ptr, Data_Ptr));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Add a new value to a data structure index */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user