Reduce database memory by detaching a memory device (simplified interface).
MCO_RET mco_db_detach_dev(
/*IN*/ const char *db_name,
/*IN*/ mco_device_t *dev
);
db_name
dev
mco_device_t structure describing the memory device to detach. Only devices with
assignment = MCO_MEMORY_ASSIGN_PIPE_BUF are supported.This function is a simplified wrapper around
mco_db_detach_dev_ctx()that passes aNULLcontext. It reduces the available memory of an opened database by detaching a previously added memory device.It is typically used to release unused memory segments when system resources need to be reclaimed. The operation requires exclusive access to the database and will fail if active transactions are present.
Important: Only devices assigned as
MCO_MEMORY_ASSIGN_PIPE_BUFcan be detached. Attempting to detach other device types will result inMCO_E_UNSUPPORTED.If the device contains active allocations, the detachment may be deferred until those objects are freed (indicated by return code
MCO_S_DEFERRED_DELETE).
MCO_S_OK
MCO_S_DEFERRED_DELETE
MCO_E_UNSUPPORTED
MCO_MEMORY_ASSIGN_PIPE_BUF.