OpenFAM Reference Implementation

openfam::fam::fam_destroy_region

Destroy an existing region in FAM.

Synopsis

void fam_destroy_region(Fam_Region_Descriptor *descriptor);

Description

This destroys a region in FAM, and asynchronously frees the space allocated to the region.

Input Arguments

NameDescription
descriptorDescriptor of the region to be destroyed.

 

Return Values

None. Throws Fam_Exception on error.

Fam Error Numbers

ErrorDescription
FAM_ERR_NOPERMCaller does not have access rights
FAM_ERR_NOTFOUNDRegion name is not present in FAM
FAM_ERR_RPCCommunication error from grpc layer.
FAM_ERR_RPC_CLIENT_NOTFOUNDRPC service not available.
FAM_ERR_METADATAMetadata service error.
FAM_ERR_MEMORYMemory service error.
FAM_ERR_RESOURCEResource not available.

Notes

If a region is destroyed, all data items in it are also destroyed. If descriptors to the region or the contained data items are subsequently used, the behavior of the library is implementation dependent. Note that this call will trigger a delayed free operation, to perform a memset operation to zero deallocated memory space from this region.

If resource release option is enabled, then the memory registrations are not released. They are released only by closing all references to region either by calling fam_close() or fam_finalize(). See fam_close API for more details.

Example

See fam_create_region