summaryrefslogtreecommitdiffstats
path: root/src/svm/ssvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/svm/ssvm.c')
-rw-r--r--src/svm/ssvm.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c
index 6f409eb68b6..6cda1f279e8 100644
--- a/src/svm/ssvm.c
+++ b/src/svm/ssvm.c
@@ -169,6 +169,22 @@ re_map_it:
return 0;
}
+void
+ssvm_delete (ssvm_private_t * ssvm)
+{
+ u8 *fn;
+
+ fn = format (0, "/dev/shm/%s%c", ssvm->name, 0);
+
+ /* Throw away the backing file */
+ if (unlink ((char *) fn) < 0)
+ clib_unix_warning ("unlink segment '%s'", ssvm->name);
+
+ munmap ((void *) ssvm->requested_va, ssvm->ssvm_size);
+ vec_free (fn);
+}
+
+
/*
* fd.io coding-style-patch-verification: ON
*