Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make MAX_SKIP_LEVEL, MAX_QSORT_SPLITS and MAX_QSORT_PARTITION configurable #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions chunk_loc.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@
/* log-bad-space info */
#define SPECIAL_CHARS "\"\"''\\\\n\nr\rt\tb\bf\fa\007"

/*
* Maximum level in the skip list. This implies that we can only
* store 2^32 entries optimally. Needless to say this is plenty.
*/
#define MAX_SKIP_LEVEL 32

/* memory table settings */
#define MEM_ALLOC_ENTRIES (MEMORY_TABLE_SIZE * 2)
#define MEM_CHANGED_ENTRIES (MEMORY_TABLE_SIZE * 2)
Expand Down
17 changes: 0 additions & 17 deletions dmalloc_tab_loc.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,6 @@

#include "conf.h"

/*
* Maximum number of splits. This should mean that these routines can
* handle at least 2^128 different values (that's _quite_ a few). And
* then you can always increase the value.
*/
#define MAX_QSORT_SPLITS 128

/*
* Maximum number of entries that must be in list for it to be
* partitioned. If there are fewer elements then just do our
* insertion sort.
*/
#define MAX_QSORT_PARTITION 8

/* comparison function */
typedef int (*compare_t)(const void *element1_p, const void *element2_p);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this never used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.:)


/*
* void HASH_MIX
*
Expand Down
20 changes: 20 additions & 0 deletions settings.dist
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@
#define MAX_FILE_LENGTH 100
#define MAX_LINE_NUMBER 30000

/*
* Maximum level in the skip list. This implies that we can only
* store 2^32 entries optimally. Needless to say this is plenty.
*/
#define MAX_SKIP_LEVEL 32

/*
* The largest allowable allocation size. This is only for
* verification purposes to control allocations of bizarre sizes. Any
Expand Down Expand Up @@ -341,6 +347,20 @@
*/
#define FREED_POINTER_DELAY 20

/*
* Maximum number of splits. This should mean that these routines can
* handle at least 2^128 different values (that's _quite_ a few). And
* then you can always increase the value.
*/
#define MAX_QSORT_SPLITS 128

/*
* Maximum number of entries that must be in list for it to be
* partitioned. If there are fewer elements then just do our
* insertion sort.
*/
#define MAX_QSORT_PARTITION 8

/*
* Size of the table of file and line number memory entries. This
* memory table records the top locations by file/line or
Expand Down