Remember to init and exit the smalloc allocator
authorJens Axboe <jens.axboe@oracle.com>
Sat, 1 Mar 2008 17:52:49 +0000 (18:52 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Sat, 1 Mar 2008 17:52:49 +0000 (18:52 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c
init.c

diff --git a/fio.c b/fio.c
index 1046c03630a7d106241ae33505a3faf634f1b1fd..de6132c034a3daa04a64c0b4e60967ccbf99d331 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -36,6 +36,7 @@
 
 #include "fio.h"
 #include "hash.h"
 
 #include "fio.h"
 #include "hash.h"
+#include "smalloc.h"
 
 unsigned long page_mask;
 unsigned long page_size;
 
 unsigned long page_mask;
 unsigned long page_size;
@@ -1302,6 +1303,8 @@ int main(int argc, char *argv[])
 {
        long ps;
 
 {
        long ps;
 
+       sinit();
+
        /*
         * We need locale for number printing, if it isn't set then just
         * go with the US format.
        /*
         * We need locale for number printing, if it isn't set then just
         * go with the US format.
diff --git a/init.c b/init.c
index d860179df6dcbe98f43f60d5a8ba999609b87824..e53f103f65bf1f8f6659fe51a2b9d97d1cda72c4 100644 (file)
--- a/init.c
+++ b/init.c
@@ -16,6 +16,7 @@
 
 #include "fio.h"
 #include "parse.h"
 
 #include "fio.h"
 #include "parse.h"
+#include "smalloc.h"
 
 static char fio_version_string[] = "fio 1.19";
 
 
 static char fio_version_string[] = "fio 1.19";
 
@@ -742,6 +743,8 @@ static void free_shm(void)
                threads = NULL;
                shmctl(shm_id, IPC_RMID, &sbuf);
        }
                threads = NULL;
                shmctl(shm_id, IPC_RMID, &sbuf);
        }
+
+       scleanup();
 }
 
 /*
 }
 
 /*