Index: lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Pool.h
===================================================================
--- lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Pool.h (revision 37803)
+++ lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Pool.h (revision 37815)
@@ -5,6 +5,6 @@
 
 #define MIL_DEBUG_PRODUCER   0
-#define MIL_MY_PRODUCER      1
-#define MIL_MALLOC_PRODUCER  0
+#define MIL_MY_PRODUCER      0
+#define MIL_MALLOC_PRODUCER  1
 #define MIL_TBB_PRODUCER     0
 
@@ -68,5 +68,5 @@
 };
 
-const unsigned int BLOCK_SIZE = sizeof(void*) * (6 + 3);
+const unsigned int BLOCK_SIZE = sizeof(void*) * 4;
 
 #if MIL_DEBUG_PRODUCER
Index: lang/objective-cplusplus/i3/trunk/src/mil/src/profile/Module.cc
===================================================================
--- lang/objective-cplusplus/i3/trunk/src/mil/src/profile/Module.cc (revision 37790)
+++ lang/objective-cplusplus/i3/trunk/src/mil/src/profile/Module.cc (revision 37815)
@@ -49,5 +49,5 @@
     int index;
     clock_t begin;
-    int posted;
+    unsigned posted;
     clock_t elapsed;
     void setIndex(int index_) {
Index: lang/objective-cplusplus/i3/trunk/src/mil/src/profile/Pool.cc
===================================================================
--- lang/objective-cplusplus/i3/trunk/src/mil/src/profile/Pool.cc (revision 37815)
+++ lang/objective-cplusplus/i3/trunk/src/mil/src/profile/Pool.cc (revision 37815)
@@ -0,0 +1,127 @@
+#include <mil/PrecompiledHeaders.h>
+#include <mil/Mil.h>
+#include <mil/Atomic.h>
+#include <mil/Thread.h>
+#include <mil/Module.h>
+
+#include "Profile.h"
+
+using namespace mil;
+using namespace mil::test;
+
+namespace {
+
+const unsigned TEST_SIZE = 20;
+
+class NullPool {
+    static char data[TEST_SIZE];    
+public:
+    void* allocate(unsigned int size) {
+        (void)size;
+        return (void*)data;
+    }
+
+    void free(void* memory) {
+        (void)memory;
+    }
+};
+char NullPool::data[TEST_SIZE];    
+
+class SimpleMallocPool {
+public:
+    void* allocate(unsigned int size) {
+        return ::malloc(size);
+    }
+
+    void free(void* memory) {
+        ::free(memory);
+    }
+};
+
+class BoostPool {    
+    boost::pool<> p;
+public:
+    BoostPool() : p(mil::pool::private_::BLOCK_SIZE) {
+    }
+    
+    void* allocate(unsigned int size) {
+        (void)size;
+        return p.malloc();
+    }
+
+    void free(void* memory) {
+        p.free(memory);
+    }
+};
+
+}
+
+template <typename P>
+static void aaaab(P& p) {
+
+#if MIL_OS_WINDOWS
+    std::ofstream o("nul");
+#else
+    std::ofstream o("/dev/null");
+#endif
+    
+    clock_t begin = clock();
+    for (unsigned i = 0; i < 2000; ++i) {
+        char* pointers[200];
+        for (unsigned j = 0; j < _countof(pointers); ++j) {
+            char* mem = (char*)p.allocate(TEST_SIZE);
+            o.write(mem, TEST_SIZE);
+            o.write((char*)pointers, sizeof(pointers));
+            pointers[j] = mem;
+            for (int k = j; k != 0; --k) {
+                o.write(pointers[k], TEST_SIZE);
+            }
+        }
+        for (unsigned j = 0; j < _countof(pointers); ++j) {
+            p.free(pointers[j]);
+        }
+    }
+    clock_t end = clock();
+    printf("%d, ", (int)((end - begin) * 1000 / CLOCKS_PER_SEC));
+}
+
+void allocattt() {
+    {
+//        printf("MyProducer\n");
+//        MyProducer p(10);
+//        aaaab(p);
+    }
+
+    {
+        printf("NullPool, ");
+        NullPool p;
+        aaaab(p);
+    }
+
+    {
+        printf("SimpleMallocPool, ");
+        SimpleMallocPool p;
+        aaaab(p);
+    }
+
+    {
+        printf("boost::pool, ");
+        BoostPool p;
+        aaaab(p);
+    }
+
+    {
+        printf("MallocProducer, ");
+        MallocProducer p(10);
+        aaaab(p);
+    }
+    printf("\n");
+    fflush(stdout);
+}
+
+QT_TEST(test_allocat) {
+    for (int i = 0; i < 30; i++) {
+        allocattt();
+    }
+}
+
