comparison src/share/vm/utilities/hashtable.inline.hpp @ 2177:3582bf76420e

6990754: Use native memory and reference counting to implement SymbolTable Summary: move symbols from permgen into C heap and reference count them Reviewed-by: never, acorn, jmasa, stefank
author coleenp
date Thu, 27 Jan 2011 16:11:27 -0800
parents f95d63e2154a
children 1d1603768966
comparison
equal deleted inserted replaced
2176:27e4ea99855d 2177:3582bf76420e
39 // character, since package names have large common prefixes, and also because 39 // character, since package names have large common prefixes, and also because
40 // hash_or_fail does error checking while iterating. 40 // hash_or_fail does error checking while iterating.
41 41
42 // hash P(31) from Kernighan & Ritchie 42 // hash P(31) from Kernighan & Ritchie
43 43
44 inline unsigned int Hashtable::hash_symbol(const char* s, int len) { 44 inline unsigned int BasicHashtable::hash_symbol(const char* s, int len) {
45 unsigned int h = 0; 45 unsigned int h = 0;
46 while (len-- > 0) { 46 while (len-- > 0) {
47 h = 31*h + (unsigned) *s; 47 h = 31*h + (unsigned) *s;
48 s++; 48 s++;
49 } 49 }