Created
June 16, 2009 23:29
-
-
Save methodmissing/130982 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifdef HASH_LOG | |
| static int collision = 0; | |
| static int init_st = 0; | |
| static void | |
| stat_col() | |
| { | |
| FILE *f = fopen("/tmp/col", "w"); | |
| fprintf(f, "collision: %d\n", collision); | |
| fclose(f); | |
| } | |
| #endif | |
| st_table* | |
| st_init_table_with_size(type, size) | |
| struct st_hash_type *type; | |
| int size; | |
| { | |
| st_table *tbl; | |
| #ifdef HASH_LOG | |
| if (init_st == 0) { | |
| init_st = 1; | |
| atexit(stat_col); | |
| } | |
| #endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment