aboutsummaryrefslogtreecommitdiffstats
path: root/utils/hashtest.c
AgeCommit message (Collapse)AuthorFilesLines
2008-04-10Merged revisions 114052 via svnmerge from mmichelson1-2/+6
https://origsvn.digium.com/svn/asterisk/trunk ................ r114052 | mmichelson | 2008-04-10 17:02:32 -0500 (Thu, 10 Apr 2008) | 11 lines Merged revisions 114051 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114051 | mmichelson | 2008-04-10 15:59:49 -0500 (Thu, 10 Apr 2008) | 3 lines Fix 1.4 build when LOW_MEMORY is enabled. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@114056 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29let's try this again... *all* compilation and linking in Asterisk should be ↵kpfleming1-16/+11
done using the standard compilation rules, not manually created ones. changing hashtest.c to use these rules caused the compiler to notice a large number of coding guidelines violations, so those are fixed too. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90150 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-9/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12Don't forget the ASTERISK_VERSION for the sake of the mtx_prof stuff.murf1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89201 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12(closes issue #11221)kpfleming1-12/+0
Reported by: eliel Patches: utils.Makefile.patch uploaded by eliel (modified by me) (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89190 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12Fix building on FreeBSD by including/not including some headers.file1-0/+2
(closes issue #11218) Reported by: ys Patches: trunk89169.diff uploaded by ys (license 281) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89177 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-09This is the perhaps the biggest, boldest, most daring change I've ever ↵murf1-0/+387
committed to trunk. Forgive me in advance any disruption this may cause, and please, report any problems via the bugtracker. The upside is that this can speed up large dialplans by 20 times (or more). Context, extension, and priority matching are all fairly constant-time searches. I introduce here my hashtables (hashtabs), and a regression for them. I would have used the ast_obj2 tables, but mine are resizeable, and don't need the object destruction capability. The hashtab stuff is well tested and stable. I introduce a data structure, a trie, for extension pattern matching, in which knowledge of all patterns is accumulated, and all matches can be found via a single traversal of the tree. This is per-context. The trie is formed on the first lookup attempt, and stored in the context for future lookups. Destruction routines are in place for hashtabs and the pattern match trie. You can see the contents of the pattern match trie by using the 'dialplan show' cli command when 'core set debug' has been done to put it in debug mode. The pattern tree traversal only traverses those parts of the tree that are interesting. It uses a scoreboard sort of approach to find the best match. The speed of the traversal is more a function of the length of the pattern than the number of patterns in the tree. The tree also contains the CID matching patterns. See the source code comments for details on how everything works. I believe the approach general enough that any issues that might come up involving fine points in the pattern matching algorithm, can be solved by just tweaking things. We shall see. The current pattern matcher is fairly involved, and replicating every nuance of it is difficult. If you find and report problems, I will try to resolve than as quickly as I can. The trie and hashtabs are added to the existing context and exten structs, and none of the old machinery has been removed for the sake of the multitude of functions that use them. In the future, we can (maybe) weed out the linked lists and save some space. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89129 f38db490-d61c-443f-a65b-d21fe96a405b