/[cvs]/eggdrop1.9/src/egglib/mempool_test.c
ViewVC logotype

Contents of /eggdrop1.9/src/egglib/mempool_test.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Sun Oct 28 13:30:35 2001 UTC (17 years, 11 months ago) by ite
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/x-chdr
FILE REMOVED
Renamed src/adns, src/compat, src/egglib to lib/adns, lib/compat, lib/egglib respectively.

1 #include <stdio.h>
2 #include "mempool.h"
3
4 main ()
5 {
6 mempool_t *pool;
7 char *test;
8 int i;
9
10 pool = mempool_create(NULL, 10, 10);
11
12 printf("Testing mempool\n");
13 for (i = 0; i < 10000000; i++) {
14 test = (char *)mempool_get_chunk(pool);
15 mempool_free_chunk(pool, test);
16 }
17 mempool_destroy(pool);
18 printf("Testing malloc\n");
19 for (i = 0; i < 10000000; i++) {
20 test = (char *)malloc(10);
21 free(test);
22 }
23 return(0);
24 }

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23