Added SILC Thread Queue API
[silc.git] / lib / silcutil / tests / test_silcstack.c
index f3c190912a8e12f48d018e17111de144aaceca2a..34b6fc3fead140a024985a44912668bea998d2cd 100644 (file)
@@ -15,7 +15,7 @@ int main(int argc, char **argv)
     silc_log_debug(TRUE);
     silc_log_debug_hexdump(TRUE);
     silc_log_quick(TRUE);
-    silc_log_set_debug_string("*stack*");
+    silc_log_set_debug_string("*stack*,*errno*");
   }
 
   SILC_LOG_DEBUG(("Allocating stack of default size (1024 bytes)"));
@@ -94,7 +94,7 @@ int main(int argc, char **argv)
   silc_stack_stats(stack);
 
   SILC_LOG_DEBUG(("Creating child stack"));
-  child = silc_stack_alloc(8192, stack);
+  child = silc_stack_alloc(8190, stack);
   if (!child)
     goto err;
   SILC_LOG_DEBUG(("Pushing %d times", NUM_ALLS / 2));
@@ -169,6 +169,10 @@ int main(int argc, char **argv)
   silc_stack_free(child);
   silc_stack_stats(stack);
 
+  SILC_LOG_DEBUG(("Purge stack"));
+  silc_stack_purge(stack);
+  silc_stack_stats(stack);
+
   SILC_LOG_DEBUG(("Current alignment: %d", silc_stack_get_alignment(stack)));
   SILC_LOG_DEBUG(("Set alignemtn to 16"));
   silc_stack_set_alignment(stack, 16);