Soar Kernel  9.3.2 08-06-12
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Macros | Functions | Variables
mem.cpp File Reference
#include <portability.h>
#include <stdlib.h>
#include "mem.h"
#include "kernel.h"
#include "agent.h"
#include "init_soar.h"
#include "print.h"
#include <assert.h>

Go to the source code of this file.

Macros

#define DEFAULT_BLOCK_SIZE   0x7FF0 /* about 32K bytes per block */
#define DEFAULT_INTERLEAVE_FACTOR   1
#define INITIAL_GROWABLE_STRING_SIZE   100

Functions

void add_block_to_memory_pool (agent *thisAgent, memory_pool *p)
listadd_if_not_member (agent *thisAgent, void *item, list *old_list)
void add_to_growable_string (agent *thisAgent, growable_string *gs, const char *string_to_add)
void add_to_hash_table (agent *thisAgent, struct hash_table_struct *ht, void *item)
void * allocate_memory (agent *thisAgent, size_t size, int usage_code)
void * allocate_memory_and_zerofill (agent *thisAgent, size_t size, int usage_code)
Bool cons_equality_fn (agent *, cons *c, void *data)
consdestructively_reverse_list (cons *c)
void do_for_all_items_in_hash_bucket (struct hash_table_struct *ht, hash_table_callback_fn f, uint32_t hash_value)
void do_for_all_items_in_hash_table (agent *thisAgent, struct hash_table_struct *ht, hash_table_callback_fn2 f, void *userdata)
dl_listextract_dl_list_elements (agent *thisAgent, dl_list **header, dl_cons_test_fn f)
listextract_list_elements (agent *thisAgent, list **header, cons_test_fn f, void *data)
void free_growable_string (agent *thisAgent, growable_string gs)
void free_hash_table (agent *thisAgent, struct hash_table_struct *ht)
void free_list (agent *thisAgent, list *the_list)
void free_memory (agent *thisAgent, void *mem, int usage_code)
void free_memory_block_for_string (agent *thisAgent, char *p)
void free_memory_pool (agent *thisAgent, memory_pool *p)
void init_memory_pool (agent *thisAgent, memory_pool *p, size_t item_size, const char *name)
void init_memory_utilities (agent *thisAgent)
growable_string make_blank_growable_string (agent *thisAgent)
struct hash_table_structmake_hash_table (agent *thisAgent, short minimum_log2size, hash_function h)
char * make_memory_block_for_string (agent *thisAgent, char const *s)
Bool member_of_list (void *item, list *the_list)
void print_memory_statistics (agent *thisAgent)
void remove_from_hash_table (agent *thisAgent, struct hash_table_struct *ht, void *item)
void resize_hash_table (agent *thisAgent, hash_table *ht, short new_log2size)

Variables

uint32_t masks_for_n_low_order_bits [33]

Macro Definition Documentation

#define DEFAULT_BLOCK_SIZE   0x7FF0 /* about 32K bytes per block */

Definition at line 222 of file mem.cpp.

Referenced by init_memory_pool().

#define DEFAULT_INTERLEAVE_FACTOR   1

Definition at line 218 of file mem.cpp.

Referenced by add_block_to_memory_pool().

#define INITIAL_GROWABLE_STRING_SIZE   100

Definition at line 157 of file mem.cpp.

Referenced by make_blank_growable_string().

Function Documentation

void add_block_to_memory_pool ( agent thisAgent,
memory_pool p 
)

Definition at line 224 of file mem.cpp.

References allocate_memory(), DEFAULT_INTERLEAVE_FACTOR, memory_pool_struct::first_block, memory_pool_struct::free_list, memory_pool_struct::item_size, memory_pool_struct::items_per_block, memory_pool_struct::num_blocks, and POOL_MEM_USAGE.

{
char *new_block;
size_t size, i, item_num, interleave_factor;
char *item, *prev_item;
/* --- allocate a new block for the pool --- */
size = p->item_size * p->items_per_block + sizeof(char *);
new_block = static_cast<char *>(allocate_memory (thisAgent, size, POOL_MEM_USAGE));
*(char * *)new_block = static_cast<char *>(p->first_block);
p->first_block = new_block;
p->num_blocks++;
/* somewhere in here, need to check if total mem usage exceeds limit set by user
we only check when increasing pools, because the other memories are small by comparison,
we shouldn't check for every block added to any pool, since that is unduly expensive
can we keep a block counter on the agent and check it modulo some function of the limit?
*/
/*
uint64_t total = 0;
for (i=0; i<NUM_MEM_USAGE_CODES; i++) total += thisAgent->memory_for_usage[i];
if (total > thisAgent->sysparams[MAX_MEMORY_USAGE_SYSPARAM]) {
soar_invoke_callbacks(thisAgent, thisAgent,
MAX_MEMORY_USAGE_CALLBACK,
(soar_call_data) NULL);
print (thisAgent, "%8lu bytes total memory allocated\n", total);
print (thisAgent, "exceeds total allowed for Soar: %8lu bytes \n",
thisAgent->sysparams[MAX_MEMORY_USAGE_SYSPARAM]);
}
*/
/* --- link up the new entries onto the free list --- */
interleave_factor = DEFAULT_INTERLEAVE_FACTOR;
if (interleave_factor >= p->items_per_block) interleave_factor = 1;
item_num = interleave_factor;
prev_item = new_block + sizeof(char *); /* prev_item is item number 0 */
for (i=0; i < p->items_per_block - 1; i++) {
item = new_block + sizeof(char *) + item_num * p->item_size;
*(char * *)prev_item = item;
prev_item = item;
item_num = item_num + interleave_factor;
if (item_num >= p->items_per_block) item_num -= p->items_per_block;
}
*(char * *)prev_item = static_cast<char *>(p->free_list);
p->free_list = new_block + sizeof(char *);
}
list* add_if_not_member ( agent thisAgent,
void *  item,
list old_list 
)

Definition at line 362 of file mem.cpp.

References allocate_cons(), cons_struct::first, NIL, and cons_struct::rest.

Referenced by collect_vars_tested_by_test_that_are_bound().

{
cons *c;
for (c=old_list; c!=NIL; c=c->rest)
if (c->first==item) return old_list;
allocate_cons (thisAgent, &c);
c->first = item;
c->rest = old_list;
return c;
}
void add_to_growable_string ( agent thisAgent,
growable_string gs,
const char *  string_to_add 
)

Definition at line 170 of file mem.cpp.

References allocate_memory(), free_memory(), length_of_growable_string(), memsize_of_growable_string(), STRING_MEM_USAGE, and text_of_growable_string().

Referenced by add_trace_for_attribute_path(), add_trace_for_wme(), add_values_of_attribute_path(), calculate_support_for_instantiation_preferences(), collect_root_variables(), object_to_trace_string(), p_node_left_addition(), parse_head_of_conds_for_one_id(), print_action_list(), print_condition_list(), reorder_simplified_conditions(), restore_and_deallocate_saved_tests(), trace_format_list_to_string(), and write_rhs_function_code().

{
size_t current_length, length_to_add, new_length, new_memsize;
current_length = length_of_growable_string(*gs);
length_to_add = strlen (string_to_add);
new_length = current_length + length_to_add;
if (new_length + 1 > static_cast<size_t>(memsize_of_growable_string(*gs))) {
new_memsize = memsize_of_growable_string(*gs);
while (new_length + 1 > new_memsize) new_memsize = new_memsize * 2;
New = allocate_memory (thisAgent, new_memsize + 2*sizeof(int *), STRING_MEM_USAGE);
memsize_of_growable_string(New) = static_cast<int>(new_memsize);
free_memory (thisAgent, *gs, STRING_MEM_USAGE);
*gs = New;
}
strcpy (text_of_growable_string(*gs)+current_length, string_to_add);
length_of_growable_string(*gs) = static_cast<int>(new_length);
}
void add_to_hash_table ( agent thisAgent,
struct hash_table_struct ht,
void *  item 
)

Definition at line 581 of file mem.cpp.

References hash_table_struct::buckets, hash_table_struct::count, hash_table_struct::h, hash_table_struct::log2size, item_in_hash_table_struct::next, resize_hash_table(), hash_table_struct::size, and uint32_t().

Referenced by add_trace_format(), find_or_make_alpha_mem(), make_float_constant(), make_int_constant(), make_new_identifier(), make_sym_constant(), and make_variable().

{
uint32_t hash_value;
item_in_hash_table *this_one;
this_one = static_cast<item_in_hash_table_struct *>(item);
ht->count++;
if (ht->count >= ht->size*2)
resize_hash_table (thisAgent, ht, ht->log2size+1);
hash_value = (*(ht->h))(item, ht->log2size);
this_one->next = *(ht->buckets+hash_value);
*(ht->buckets+hash_value) = this_one;
}
void* allocate_memory ( agent thisAgent,
size_t  size,
int  usage_code 
)

Definition at line 44 of file mem.cpp.

References abort_with_fatal_error(), BUFFER_MSG_SIZE, fill_with_garbage, agent_struct::memory_for_usage, and STATS_OVERHEAD_MEM_USAGE.

Referenced by add_block_to_memory_pool(), add_rhs_function(), add_to_growable_string(), add_trace_format(), allocate_memory_and_zerofill(), make_blank_growable_string(), make_hash_table(), make_memory_block_for_string(), parse_item_from_format_string(), print_match_set(), read_rest_of_floating_point_number(), reteload_all_symbols(), reteload_alpha_memories(), start_lex_from_file(), and xml_match_set().

{
char *p;
thisAgent->memory_for_usage[usage_code] += size;
size += sizeof(size_t);
thisAgent->memory_for_usage[STATS_OVERHEAD_MEM_USAGE] += sizeof(size_t);
p = static_cast<char *>(malloc (size));
if (p==NULL) {
char msg[BUFFER_MSG_SIZE];
SNPRINTF(msg, BUFFER_MSG_SIZE, "\nmem.c: Error: Tried but failed to allocate %llu bytes of memory.\n", static_cast<long long unsigned>(size));
msg[BUFFER_MSG_SIZE - 1] = 0; /* ensure null termination */
abort_with_fatal_error (thisAgent, msg);
}
if (reinterpret_cast<uintptr_t>(p) & 3) {
char msg[BUFFER_MSG_SIZE];
strncpy (msg,"\nmem.c: Error: Memory allocator returned an address that's not a multiple of 4.\n", BUFFER_MSG_SIZE);
msg[BUFFER_MSG_SIZE - 1] = 0; /* ensure null termination */
abort_with_fatal_error(thisAgent, msg);
}
fill_with_garbage (p, size);
*(reinterpret_cast<size_t *>(p)) = size;
p += sizeof(size_t);
return p;
}
void* allocate_memory_and_zerofill ( agent thisAgent,
size_t  size,
int  usage_code 
)

Definition at line 73 of file mem.cpp.

References allocate_memory().

Referenced by init_rete(), make_hash_table(), resize_hash_table(), and update_max_rhs_unbound_variables().

{
void *p;
p = allocate_memory (thisAgent, size, usage_code);
memset (p, 0, size);
return p;
}
Bool cons_equality_fn ( agent ,
cons c,
void *  data 
)

Definition at line 453 of file mem.cpp.

References cons_struct::first.

Referenced by remove_existing_context_and_descendents().

{
return (c->first == data);
}
cons* destructively_reverse_list ( cons c)

Definition at line 340 of file mem.cpp.

References NIL, and cons_struct::rest.

Referenced by add_production_to_rete(), copy_test_removing_goal_impasse_tests(), fill_in_new_instantiation_stuff(), parse_attribute_path_in_brackets(), parse_disjunction_test(), parse_test(), reteload_node_and_children(), reteload_rete_test(), reteload_rhs_value(), and reteload_varnames().

{
cons *prev, *current, *next;
prev = NIL;
current = c;
while (current) {
next = current->rest;
current->rest = prev;
prev = current;
current = next;
}
return prev;
}
void do_for_all_items_in_hash_bucket ( struct hash_table_struct ht,
hash_table_callback_fn  f,
uint32_t  hash_value 
)

Definition at line 610 of file mem.cpp.

References hash_table_struct::buckets, hash_table_struct::log2size, masks_for_n_low_order_bits, item_in_hash_table_struct::next, and NIL.

{
hash_value = hash_value & masks_for_n_low_order_bits[ht->log2size];
item = (item_in_hash_table *) (*(ht->buckets + hash_value));
for ( ; item!=NIL; item = item->next)
if ((*f)(item)) return;
}
void do_for_all_items_in_hash_table ( agent thisAgent,
struct hash_table_struct ht,
hash_table_callback_fn2  f,
void *  userdata 
)

Definition at line 595 of file mem.cpp.

References hash_table_struct::buckets, item_in_hash_table_struct::next, NIL, hash_table_struct::size, and uint32_t().

Referenced by print_all_trace_formats(), print_all_trace_formats_tcl(), print_internal_symbols(), reset_id_and_variable_tc_numbers(), reset_id_counters(), reset_variable_gensym_numbers(), retesave_alpha_memories(), and retesave_symbol_table().

{
uint32_t hash_value;
for (hash_value=0; hash_value < ht->size; hash_value++) {
item = (item_in_hash_table *) (*(ht->buckets + hash_value));
for ( ; item!=NIL; item = item->next)
if ((*f)(thisAgent, item, userdata)) return;
}
}
dl_list* extract_dl_list_elements ( agent thisAgent,
dl_list **  header,
dl_cons_test_fn  f 
)

Definition at line 419 of file mem.cpp.

References dl_cons_struct::next, NIL, dl_cons_struct::prev, and remove_from_dll.

Referenced by print_action_list(), print_condition_list(), and xml_condition_list().

{
dl_cons *first_extracted_element, *tail_of_extracted_elements;
dl_cons *dc, *next_dc;
first_extracted_element = NIL;
tail_of_extracted_elements = NIL;
for (dc=(*header); dc!=NIL; dc=next_dc)
{
next_dc = dc->next;
if (!f(dc,thisAgent))
continue;
remove_from_dll ((*header), dc, next, prev);
if (first_extracted_element)
tail_of_extracted_elements->next = dc;
else
first_extracted_element = dc;
dc->prev = tail_of_extracted_elements;
tail_of_extracted_elements = dc;
}
/************************************************************************/
if (first_extracted_element)
tail_of_extracted_elements->next = NIL;
return first_extracted_element;
}
list* extract_list_elements ( agent thisAgent,
list **  header,
cons_test_fn  f,
void *  data 
)

Definition at line 383 of file mem.cpp.

References NIL, and cons_struct::rest.

Referenced by remove_existing_context_and_descendents(), and remove_pwatch().

{
cons *first_extracted_element, *tail_of_extracted_elements;
cons *c, *prev_c, *next_c;
first_extracted_element = NIL;
tail_of_extracted_elements = NIL;
prev_c = NIL;
for (c=(*header); c!=NIL; c=next_c)
{
next_c = c->rest;
if (!f(thisAgent, c, data))
{
prev_c = c;
continue;
}
if (prev_c)
prev_c->rest = next_c;
else
*header = next_c;
if (first_extracted_element)
tail_of_extracted_elements->rest = c;
else
first_extracted_element = c;
tail_of_extracted_elements = c;
}
if (first_extracted_element)
tail_of_extracted_elements->rest = NIL;
return first_extracted_element;
}
void free_growable_string ( agent thisAgent,
growable_string  gs 
)
void free_hash_table ( agent thisAgent,
struct hash_table_struct ht 
)

Definition at line 548 of file mem.cpp.

References hash_table_struct::buckets, free_memory(), and HASH_TABLE_MEM_USAGE.

Referenced by destroy_soar_agent().

void free_list ( agent thisAgent,
list the_list 
)
void free_memory ( agent thisAgent,
void *  mem,
int  usage_code 
)
void free_memory_block_for_string ( agent thisAgent,
char *  p 
)
void free_memory_pool ( agent thisAgent,
memory_pool p 
)

Definition at line 274 of file mem.cpp.

References memory_pool_struct::first_block, free_memory(), memory_pool_struct::num_blocks, and POOL_MEM_USAGE.

Referenced by destroy_soar_agent().

{
char *cur_block = static_cast<char*>(p->first_block);
char *next_block;
for(size_t i=0; i<p->num_blocks; i++) {
// the first 4 bytes point to the next block
next_block = *(char **)cur_block;
free_memory(thisAgent, cur_block, POOL_MEM_USAGE);
cur_block = next_block;
}
p->num_blocks = 0;
}
void init_memory_pool ( agent thisAgent,
memory_pool p,
size_t  item_size,
const char *  name 
)

Definition at line 287 of file mem.cpp.

References abort_with_fatal_error(), DEFAULT_BLOCK_SIZE, memory_pool_struct::first_block, memory_pool_struct::free_list, memory_pool_struct::item_size, memory_pool_struct::items_per_block, MAX_POOL_NAME_LENGTH, agent_struct::memory_pools_in_use, memory_pool_struct::name, memory_pool_struct::next, NIL, memory_pool_struct::num_blocks, and memory_pool_struct::used_count.

Referenced by soar_module::get_memory_pool(), init_chunker(), init_decider(), init_firer(), init_memory_utilities(), init_production_utilities(), init_reorderer(), init_rete(), init_soar_agent(), init_soar_io(), and init_symbol_tables().

{
if (item_size < sizeof(char *)) item_size = sizeof(char *);
while (item_size & 3) item_size++; /* make sure item_size is multiple of 4 */
p->item_size = item_size;
p->num_blocks = 0;
p->free_list = NIL;
#ifdef MEMORY_POOL_STATS
p->used_count = 0;
#endif
p->next = thisAgent->memory_pools_in_use;
thisAgent->memory_pools_in_use = p;
if (strlen(name) > MAX_POOL_NAME_LENGTH) {
char msg[2*MAX_POOL_NAME_LENGTH];
SNPRINTF(msg, 2*MAX_POOL_NAME_LENGTH, "mem.c: Internal error: memory pool name too long: %s\n",name);
msg[2*MAX_POOL_NAME_LENGTH - 1] = 0; /* ensure null termination */
abort_with_fatal_error(thisAgent, msg);
}
strncpy(p->name,name,MAX_POOL_NAME_LENGTH);
p->name[MAX_POOL_NAME_LENGTH - 1] = 0; /* ensure null termination */
}
void init_memory_utilities ( agent thisAgent)

Definition at line 629 of file mem.cpp.

References agent_struct::cons_cell_pool, agent_struct::dl_cons_pool, init_memory_pool(), agent_struct::memory_for_usage, and NUM_MEM_USAGE_CODES.

Referenced by create_soar_agent().

{
int i;
init_memory_pool (thisAgent, &thisAgent->cons_cell_pool, sizeof(cons), "cons cell");
init_memory_pool (thisAgent, &thisAgent->dl_cons_pool, sizeof(dl_cons), "dl cons");
for (i=0; i<NUM_MEM_USAGE_CODES; i++) thisAgent->memory_for_usage[i] = 0;
}
growable_string make_blank_growable_string ( agent thisAgent)
struct hash_table_struct* make_hash_table ( agent thisAgent,
short  minimum_log2size,
hash_function  h 
)
read

Definition at line 502 of file mem.cpp.

References allocate_memory(), allocate_memory_and_zerofill(), hash_table_struct::buckets, hash_table_struct::count, hash_table_struct::h, HASH_TABLE_MEM_USAGE, hash_table_struct::log2size, hash_table_struct::minimum_log2size, hash_table_struct::size, and uint32_t().

Referenced by init_rete(), init_symbol_tables(), and init_tracing().

{
ht = static_cast<hash_table_struct *>(allocate_memory (thisAgent, sizeof(hash_table),
ht->count = 0;
if (minimum_log2size < 1) minimum_log2size = 1;
ht->size = static_cast<uint32_t>(1) << minimum_log2size;
ht->log2size = minimum_log2size;
ht->minimum_log2size = minimum_log2size;
ht->buckets = static_cast<item_in_hash_table_struct **>(allocate_memory_and_zerofill (thisAgent, ht->size * sizeof(char *),
ht->h = h;
return ht;
}
char* make_memory_block_for_string ( agent thisAgent,
char const *  s 
)

Definition at line 142 of file mem.cpp.

References allocate_memory(), and STRING_MEM_USAGE.

Referenced by make_sym_constant(), make_variable(), parse_item_from_format_string(), parse_production(), reteload_node_and_children(), rl_perform_update(), and start_lex_from_file().

{
char *p;
size_t size;
size = strlen(s)+1; /* plus one for trailing null character */
p = static_cast<char *>(allocate_memory (thisAgent, size, STRING_MEM_USAGE));
strncpy(p,s,size);
p[size-1] = 0; /* ensure null termination */
return p;
}
Bool member_of_list ( void *  item,
list the_list 
)

Definition at line 354 of file mem.cpp.

References FALSE, cons_struct::first, cons_struct::rest, and TRUE.

Referenced by dont_learn_rhs_function_code(), find_compile_time_match_goal(), force_learn_rhs_function_code(), should_variablize(), test_covered_by_bound_vars(), test_is_for_symbol(), and test_tests_for_root().

{
while (the_list) {
if (the_list->first == item) return TRUE;
the_list = the_list->rest;
}
return FALSE;
}
void print_memory_statistics ( agent thisAgent)

Definition at line 96 of file mem.cpp.

References HASH_TABLE_MEM_USAGE, agent_struct::memory_for_usage, MISCELLANEOUS_MEM_USAGE, NUM_MEM_USAGE_CODES, POOL_MEM_USAGE, print(), STATS_OVERHEAD_MEM_USAGE, and STRING_MEM_USAGE.

{
size_t total;
int i;
total = 0;
for (i=0; i<NUM_MEM_USAGE_CODES; i++) total += thisAgent->memory_for_usage[i];
print (thisAgent, "%8lu bytes total memory allocated\n", total);
print(thisAgent, "%8lu bytes statistics overhead\n",
print(thisAgent, "%8lu bytes for strings\n",
print(thisAgent, "%8lu bytes for hash tables\n",
print(thisAgent, "%8lu bytes for various memory pools\n",
print(thisAgent, "%8lu bytes for miscellaneous other things\n",
}
void remove_from_hash_table ( agent thisAgent,
struct hash_table_struct ht,
void *  item 
)

Definition at line 553 of file mem.cpp.

References hash_table_struct::buckets, hash_table_struct::count, hash_table_struct::h, hash_table_struct::log2size, hash_table_struct::minimum_log2size, item_in_hash_table_struct::next, NIL, resize_hash_table(), hash_table_struct::size, and uint32_t().

Referenced by deallocate_symbol(), remove_ref_to_alpha_mem(), and remove_trace_format().

{
uint32_t hash_value;
item_in_hash_table *this_one, *prev;
this_one = static_cast<item_in_hash_table_struct *>(item);
hash_value = (*(ht->h))(item, ht->log2size);
if (*(ht->buckets+hash_value)==this_one) {
/* --- hs is the first one on the list for the bucket --- */
*(ht->buckets+hash_value) = this_one->next;
} else {
/* --- hs is not the first one on the list, so find its predecessor --- */
prev = *(ht->buckets+hash_value);
while (prev && prev->next != this_one) prev=prev->next;
if ( !prev ) {
/* Reaching here means that we couldn't find this_one item */
assert(prev && "Couldn't find item to remove from hash table!");
return;
}
prev->next = this_one->next;
}
this_one->next = NIL; /* just for safety */
/* --- update count and possibly resize the table --- */
ht->count--;
if ((ht->count < ht->size/2) && (ht->log2size > ht->minimum_log2size))
resize_hash_table (thisAgent, ht, ht->log2size-1);
}
void resize_hash_table ( agent thisAgent,
hash_table ht,
short  new_log2size 
)

Definition at line 519 of file mem.cpp.

References allocate_memory_and_zerofill(), hash_table_struct::buckets, free_memory(), hash_table_struct::h, HASH_TABLE_MEM_USAGE, hash_table_struct::log2size, item_in_hash_table_struct::next, NIL, hash_table_struct::size, and uint32_t().

Referenced by add_to_hash_table(), and remove_from_hash_table().

{
bucket_array *new_buckets;
item_in_hash_table *item, *next;
uint32_t hash_value;
uint32_t new_size;
new_size = static_cast<uint32_t>(1) << new_log2size;
new_buckets =
(bucket_array *) allocate_memory_and_zerofill (thisAgent, new_size*sizeof(char *),
for (i=0; i < ht->size; i++) {
for (item = *(ht->buckets + i); item!=NIL; item=next) {
next = item->next;
/* --- insert item into new buckets --- */
hash_value = (*(ht->h))(item,new_log2size);
item->next = *(new_buckets+hash_value);
*(new_buckets+hash_value) = item;
}
}
ht->buckets = new_buckets;
ht->size = new_size;
ht->log2size = new_log2size;
}

Variable Documentation

uint32_t masks_for_n_low_order_bits[33]
Initial value:
{ 0x00000000,
0x00000001, 0x00000003, 0x00000007, 0x0000000F,
0x0000001F, 0x0000003F, 0x0000007F, 0x000000FF,
0x000001FF, 0x000003FF, 0x000007FF, 0x00000FFF,
0x00001FFF, 0x00003FFF, 0x00007FFF, 0x0000FFFF,
0x0001FFFF, 0x0003FFFF, 0x0007FFFF, 0x000FFFFF,
0x001FFFFF, 0x003FFFFF, 0x007FFFFF, 0x00FFFFFF,
0x01FFFFFF, 0x03FFFFFF, 0x07FFFFFF, 0x0FFFFFFF,
0x1FFFFFFF, 0x3FFFFFFF, 0x7FFFFFFF, 0xFFFFFFFF }

Definition at line 492 of file mem.cpp.

Referenced by add_wme_to_aht(), alpha_hash_value(), compress(), do_for_all_items_in_hash_bucket(), hash_name_restriction(), and make_chunk_cond_for_condition().