From: Brian Demsky Date: Thu, 15 Nov 2012 07:27:30 +0000 (-0800) Subject: Merge branch 'master' of /home/git/model-checker X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=commitdiff_plain;h=c3ad6c109b0043a010838e77e2573aa820072820;hp=44118f596eb7cd9b4b0b5037fbbf958db001accc Merge branch 'master' of /home/git/model-checker --- diff --git a/cyclegraph.cc b/cyclegraph.cc index 33f8cda8..ead70ae6 100644 --- a/cyclegraph.cc +++ b/cyclegraph.cc @@ -6,6 +6,7 @@ /** Initializes a CycleGraph object. */ CycleGraph::CycleGraph() : + discovered(new HashTable(16)), hasCycles(false), oldCycles(false), hasRMWViolation(false), @@ -182,10 +183,10 @@ bool CycleGraph::checkReachable(const ModelAction *from, const ModelAction *to) */ bool CycleGraph::checkReachable(CycleNode *from, CycleNode *to) { std::vector > queue; - HashTable discovered(64); + discovered->reset(); queue.push_back(from); - discovered.put(from, from); + discovered->put(from, from); while(!queue.empty()) { CycleNode * node=queue.back(); queue.pop_back(); @@ -194,8 +195,8 @@ bool CycleGraph::checkReachable(CycleNode *from, CycleNode *to) { for(unsigned int i=0;igetEdges()->size();i++) { CycleNode *next=(*node->getEdges())[i]; - if (!discovered.contains(next)) { - discovered.put(next,next); + if (!discovered->contains(next)) { + discovered->put(next,next); queue.push_back(next); } } @@ -205,12 +206,12 @@ bool CycleGraph::checkReachable(CycleNode *from, CycleNode *to) { bool CycleGraph::checkPromise(const ModelAction *fromact, Promise *promise) { std::vector > queue; - HashTable discovered(64); + discovered->reset(); CycleNode *from = actionToNode.get(fromact); queue.push_back(from); - discovered.put(from, from); + discovered->put(from, from); while(!queue.empty()) { CycleNode * node=queue.back(); queue.pop_back(); @@ -221,8 +222,8 @@ bool CycleGraph::checkPromise(const ModelAction *fromact, Promise *promise) { for(unsigned int i=0;igetEdges()->size();i++) { CycleNode *next=(*node->getEdges())[i]; - if (!discovered.contains(next)) { - discovered.put(next,next); + if (!discovered->contains(next)) { + discovered->put(next,next); queue.push_back(next); } } diff --git a/cyclegraph.h b/cyclegraph.h index 1cc0d069..f0f04ffe 100644 --- a/cyclegraph.h +++ b/cyclegraph.h @@ -37,6 +37,7 @@ class CycleGraph { SNAPSHOTALLOC private: CycleNode * getNode(const ModelAction *); + HashTable * discovered; /** @brief A table for mapping ModelActions to CycleNodes */ HashTable actionToNode; diff --git a/hashtable.h b/hashtable.h index a337df41..bf759285 100644 --- a/hashtable.h +++ b/hashtable.h @@ -23,27 +23,11 @@ * @tparam _free Provide your own 'free' for the table, or default to * snapshotting. */ -template +template + struct hashlistnode { _Key key; _Val val; - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *next; - - void * operator new(size_t size) { - return _malloc(size); - } - - void operator delete(void *p, size_t size) { - _free(p); - } - - void * operator new[](size_t size) { - return _malloc(size); - } - - void operator delete[](void *p, size_t size) { - _free(p); - } }; /** @@ -74,24 +58,17 @@ template **) _calloc(initialcapacity, sizeof(struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *)); + table = (struct hashlistnode<_Key,_Val> *) _calloc(initialcapacity, sizeof(struct hashlistnode<_Key,_Val>)); loadfactor = factor; capacity = initialcapacity; + capacitymask = initialcapacity - 1; + threshold = (unsigned int) (initialcapacity*loadfactor); - mask = (capacity << _Shift)-1; size = 0; // Initial number of elements in the hash } /** Destructor */ ~HashTable() { - for(unsigned int i=0;i * bin = table[i]; - while(bin!=NULL) { - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> * next=bin->next; - delete bin; - bin=next; - } - } _free(table); } @@ -117,15 +94,7 @@ template * bin = table[i]; - while(bin!=NULL) { - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> * next=bin->next; - delete bin; - bin=next; - } - } - memset(table, 0, capacity*sizeof(struct hashlistnode<_Key, _Val, _malloc, _calloc, _free> *)); + memset(table, 0, capacity*sizeof(struct hashlistnode<_Key, _Val>)); size=0; } @@ -134,135 +103,99 @@ template threshold) resize(capacity << 1); - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *ptr = table[(((_KeyInt)key) & mask)>>_Shift]; - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *search = ptr; + struct hashlistnode<_Key,_Val> *search; - while(search!=NULL) { + unsigned int index=((_KeyInt)key)>>_Shift; + do { + index=index&capacitymask; + search = &table[index]; if (search->key==key) { search->val=val; return; } - search=search->next; - } - - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *newptr=(struct hashlistnode<_Key,_Val,_malloc,_calloc,_free> *)new struct hashlistnode<_Key,_Val, _malloc, _calloc, _free>; - newptr->key=key; - newptr->val=val; - newptr->next=ptr; - table[(((_KeyInt)key)&mask)>>_Shift]=newptr; + index++; + } while(search->key); + + search->key=key; + search->val=val; size++; } - /** - * @brief Get a valid pointer to a value corresponding to a given key - * - * Ensure that key is present in the hash table, then return a pointer - * to its value bin. This may require either creating a new bin for - * this key (with a default-constructed value) or simply locating and - * returning a pointer to an existing value. - * @param key The key to check - * @return A pointer to the value in the table - */ - _Val * get_safe_ptr(_Key key) { - if (size > threshold) - resize(capacity << 1); - - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *ptr = table[(((_KeyInt)key) & mask)>>_Shift]; - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *search = ptr; - - while(search!=NULL) { - if (search->key==key) { - return &search->val; - } - search=search->next; - } - - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *newptr=(struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *)new struct hashlistnode<_Key,_Val, _malloc, _calloc, _free>; - newptr->key=key; - newptr->next=ptr; - table[(((_KeyInt)key)&mask)>>_Shift]=newptr; - size++; - return &newptr->val; - } - /** Lookup the corresponding value for the given key. */ _Val get(_Key key) { - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *search = table[(((_KeyInt)key) & mask)>>_Shift]; + struct hashlistnode<_Key,_Val> *search; - while(search!=NULL) { + unsigned int index=((_KeyInt)key)>>_Shift; + do { + index=index&capacitymask; + search = &table[index]; if (search->key==key) { return search->val; } - search=search->next; - } - return (_Val)0; - } - - /** Lookup the corresponding value for the given key. */ - _Val * getptr(_Key key) { - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *search = table[(((_KeyInt)key) & mask)>>_Shift]; - - while(search!=NULL) { - if (search->key==key) { - return & search->val; - } - search=search->next; - } - return (_Val *) NULL; + index++; + } while(search->key); + return (_Val) 0; } /** Check whether the table contains a value for the given key. */ bool contains(_Key key) { - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *search = table[(((_KeyInt)key) & mask)>>_Shift]; + struct hashlistnode<_Key,_Val> *search; - while(search!=NULL) { + unsigned int index=((_KeyInt)key)>>_Shift; + do { + index=index&capacitymask; + search = &table[index]; if (search->key==key) { return true; } - search=search->next; - } + index++; + } while(search->key); return false; } /** Resize the table. */ void resize(unsigned int newsize) { - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> ** oldtable = table; - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> ** newtable; + struct hashlistnode<_Key,_Val> * oldtable = table; + struct hashlistnode<_Key,_Val> * newtable; unsigned int oldcapacity = capacity; - if((newtable = (struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> **) _calloc(newsize, sizeof(struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *))) == NULL) { + if((newtable = (struct hashlistnode<_Key,_Val> *) _calloc(newsize, sizeof(struct hashlistnode<_Key,_Val>))) == NULL) { printf("Calloc error %s %d\n", __FILE__, __LINE__); exit(-1); } - + table = newtable; //Update the global hashtable upon resize() capacity = newsize; - threshold = (unsigned int) (newsize * loadfactor); - mask = (newsize << _Shift)-1; + capacitymask = newsize - 1; - for(unsigned int i = 0; i < oldcapacity; i++) { - struct hashlistnode<_Key, _Val, _malloc, _calloc, _free> * bin = oldtable[i]; - - while(bin!=NULL) { - _Key key=bin->key; - struct hashlistnode<_Key, _Val, _malloc, _calloc, _free> * next=bin->next; + threshold = (unsigned int) (newsize * loadfactor); - unsigned int index = (((_KeyInt)key) & mask) >>_Shift; - struct hashlistnode<_Key, _Val, _malloc, _calloc, _free> * tmp=newtable[index]; - bin->next=tmp; - newtable[index]=bin; - bin = next; - } + struct hashlistnode<_Key, _Val> * bin = &oldtable[0]; + struct hashlistnode<_Key, _Val> * lastbin = &oldtable[oldcapacity]; + for(; bin < lastbin; bin++) { + _Key key=bin->key; + + struct hashlistnode<_Key,_Val> *search; + + unsigned int index=((_KeyInt)key)>>_Shift; + do { + index=index&capacitymask; + search = &table[index]; + index++; + } while(search->key); + + search->key=key; + search->val=bin->val; } _free(oldtable); //Free the memory of the old hash table } private: - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> **table; + struct hashlistnode<_Key,_Val> *table; unsigned int capacity; - _KeyInt mask; unsigned int size; + unsigned int capacitymask; unsigned int threshold; double loadfactor; }; diff --git a/model.cc b/model.cc index 922a0d60..e5c8a550 100644 --- a/model.cc +++ b/model.cc @@ -40,10 +40,10 @@ ModelChecker::ModelChecker(struct model_params params) : earliest_diverge(NULL), action_trace(new action_list_t()), thread_map(new HashTable()), - obj_map(new HashTable()), - lock_waiters_map(new HashTable()), - condvar_waiters_map(new HashTable()), - obj_thrd_map(new HashTable, uintptr_t, 4 >()), + obj_map(new HashTable()), + lock_waiters_map(new HashTable()), + condvar_waiters_map(new HashTable()), + obj_thrd_map(new HashTable *, uintptr_t, 4 >()), promises(new std::vector< Promise *, SnapshotAlloc >()), futurevalues(new std::vector< struct PendingFutureValue, SnapshotAlloc >()), pending_rel_seqs(new std::vector< struct release_seq *, SnapshotAlloc >()), @@ -90,6 +90,24 @@ ModelChecker::~ModelChecker() delete mo_graph; } +static action_list_t * get_safe_ptr_action(HashTable * hash, void * ptr) { + action_list_t * tmp=hash->get(ptr); + if (tmp==NULL) { + tmp=new action_list_t(); + hash->put(ptr, tmp); + } + return tmp; +} + +static std::vector * get_safe_ptr_vect_action(HashTable *, uintptr_t, 4> * hash, void * ptr) { + std::vector * tmp=hash->get(ptr); + if (tmp==NULL) { + tmp=new std::vector(); + hash->put(ptr, tmp); + } + return tmp; +} + /** * Restores user program to initial state and resets all model-checker data * structures. @@ -330,7 +348,7 @@ ModelAction * ModelChecker::get_last_conflict(ModelAction *act) case ATOMIC_WRITE: case ATOMIC_RMW: { /* linear search: from most recent to oldest */ - action_list_t *list = obj_map->get_safe_ptr(act->get_location()); + action_list_t *list = get_safe_ptr_action(obj_map, act->get_location()); action_list_t::reverse_iterator rit; for (rit = list->rbegin(); rit != list->rend(); rit++) { ModelAction *prev = *rit; @@ -342,7 +360,7 @@ ModelAction * ModelChecker::get_last_conflict(ModelAction *act) case ATOMIC_LOCK: case ATOMIC_TRYLOCK: { /* linear search: from most recent to oldest */ - action_list_t *list = obj_map->get_safe_ptr(act->get_location()); + action_list_t *list = get_safe_ptr_action(obj_map, act->get_location()); action_list_t::reverse_iterator rit; for (rit = list->rbegin(); rit != list->rend(); rit++) { ModelAction *prev = *rit; @@ -353,7 +371,7 @@ ModelAction * ModelChecker::get_last_conflict(ModelAction *act) } case ATOMIC_UNLOCK: { /* linear search: from most recent to oldest */ - action_list_t *list = obj_map->get_safe_ptr(act->get_location()); + action_list_t *list = get_safe_ptr_action(obj_map, act->get_location()); action_list_t::reverse_iterator rit; for (rit = list->rbegin(); rit != list->rend(); rit++) { ModelAction *prev = *rit; @@ -364,7 +382,7 @@ ModelAction * ModelChecker::get_last_conflict(ModelAction *act) } case ATOMIC_WAIT: { /* linear search: from most recent to oldest */ - action_list_t *list = obj_map->get_safe_ptr(act->get_location()); + action_list_t *list = get_safe_ptr_action(obj_map, act->get_location()); action_list_t::reverse_iterator rit; for (rit = list->rbegin(); rit != list->rend(); rit++) { ModelAction *prev = *rit; @@ -379,7 +397,7 @@ ModelAction * ModelChecker::get_last_conflict(ModelAction *act) case ATOMIC_NOTIFY_ALL: case ATOMIC_NOTIFY_ONE: { /* linear search: from most recent to oldest */ - action_list_t *list = obj_map->get_safe_ptr(act->get_location()); + action_list_t *list = get_safe_ptr_action(obj_map, act->get_location()); action_list_t::reverse_iterator rit; for (rit = list->rbegin(); rit != list->rend(); rit++) { ModelAction *prev = *rit; @@ -579,7 +597,7 @@ bool ModelChecker::process_mutex(ModelAction *curr) { //unlock the lock state->islocked = false; //wake up the other threads - action_list_t *waiters = lock_waiters_map->get_safe_ptr(curr->get_location()); + action_list_t *waiters = get_safe_ptr_action(lock_waiters_map, curr->get_location()); //activate all the waiting threads for (action_list_t::iterator rit = waiters->begin(); rit != waiters->end(); rit++) { scheduler->wake(get_thread(*rit)); @@ -591,7 +609,7 @@ bool ModelChecker::process_mutex(ModelAction *curr) { //unlock the lock state->islocked = false; //wake up the other threads - action_list_t *waiters = lock_waiters_map->get_safe_ptr((void *) curr->get_value()); + action_list_t *waiters = get_safe_ptr_action(lock_waiters_map, (void *) curr->get_value()); //activate all the waiting threads for (action_list_t::iterator rit = waiters->begin(); rit != waiters->end(); rit++) { scheduler->wake(get_thread(*rit)); @@ -599,14 +617,14 @@ bool ModelChecker::process_mutex(ModelAction *curr) { waiters->clear(); //check whether we should go to sleep or not...simulate spurious failures if (curr->get_node()->get_misc()==0) { - condvar_waiters_map->get_safe_ptr(curr->get_location())->push_back(curr); + get_safe_ptr_action(condvar_waiters_map, curr->get_location())->push_back(curr); //disable us scheduler->sleep(get_current_thread()); } break; } case ATOMIC_NOTIFY_ALL: { - action_list_t *waiters = condvar_waiters_map->get_safe_ptr(curr->get_location()); + action_list_t *waiters = get_safe_ptr_action(condvar_waiters_map, curr->get_location()); //activate all the waiting threads for (action_list_t::iterator rit = waiters->begin(); rit != waiters->end(); rit++) { scheduler->wake(get_thread(*rit)); @@ -615,7 +633,7 @@ bool ModelChecker::process_mutex(ModelAction *curr) { break; } case ATOMIC_NOTIFY_ONE: { - action_list_t *waiters = condvar_waiters_map->get_safe_ptr(curr->get_location()); + action_list_t *waiters = get_safe_ptr_action(condvar_waiters_map, curr->get_location()); int wakeupthread=curr->get_node()->get_misc(); action_list_t::iterator it = waiters->begin(); advance(it, wakeupthread); @@ -839,7 +857,7 @@ bool ModelChecker::initialize_curr_action(ModelAction **curr) else if (newcurr->is_wait()) newcurr->get_node()->set_misc_max(2); else if (newcurr->is_notify_one()) { - newcurr->get_node()->set_misc_max(condvar_waiters_map->get_safe_ptr(newcurr->get_location())->size()); + newcurr->get_node()->set_misc_max(get_safe_ptr_action(condvar_waiters_map, newcurr->get_location())->size()); } return true; /* This was a new ModelAction */ } @@ -861,7 +879,7 @@ bool ModelChecker::check_action_enabled(ModelAction *curr) { struct std::mutex_state * state = lock->get_state(); if (state->islocked) { //Stick the action in the appropriate waiting queue - lock_waiters_map->get_safe_ptr(curr->get_location())->push_back(curr); + get_safe_ptr_action(lock_waiters_map, curr->get_location())->push_back(curr); return false; } } else if (curr->get_type() == THREAD_JOIN) { @@ -1086,7 +1104,7 @@ void ModelChecker::check_recency(ModelAction *curr, const ModelAction *rf) { //accidentally clear by rolling back if (!isfeasible()) return; - std::vector *thrd_lists = obj_thrd_map->get_safe_ptr(curr->get_location()); + std::vector *thrd_lists = get_safe_ptr_vect_action(obj_thrd_map, curr->get_location()); int tid = id_to_int(curr->get_tid()); /* Skip checks */ @@ -1178,7 +1196,7 @@ void ModelChecker::check_recency(ModelAction *curr, const ModelAction *rf) { */ bool ModelChecker::r_modification_order(ModelAction *curr, const ModelAction *rf) { - std::vector *thrd_lists = obj_thrd_map->get_safe_ptr(curr->get_location()); + std::vector *thrd_lists = get_safe_ptr_vect_action(obj_thrd_map, curr->get_location()); unsigned int i; bool added = false; ASSERT(curr->is_read()); @@ -1237,7 +1255,7 @@ bool ModelChecker::r_modification_order(ModelAction *curr, const ModelAction *rf */ void ModelChecker::post_r_modification_order(ModelAction *curr, const ModelAction *rf) { - std::vector *thrd_lists = obj_thrd_map->get_safe_ptr(curr->get_location()); + std::vector *thrd_lists = get_safe_ptr_vect_action(obj_thrd_map, curr->get_location()); unsigned int i; ASSERT(curr->is_read()); @@ -1308,7 +1326,7 @@ void ModelChecker::post_r_modification_order(ModelAction *curr, const ModelActio */ bool ModelChecker::w_modification_order(ModelAction *curr) { - std::vector *thrd_lists = obj_thrd_map->get_safe_ptr(curr->get_location()); + std::vector *thrd_lists = get_safe_ptr_vect_action(obj_thrd_map, curr->get_location()); unsigned int i; bool added = false; ASSERT(curr->is_write()); @@ -1430,7 +1448,7 @@ bool ModelChecker::thin_air_constraint_may_allow(const ModelAction * writer, con */ bool ModelChecker::mo_may_allow(const ModelAction *writer, const ModelAction *reader) { - std::vector *thrd_lists = obj_thrd_map->get_safe_ptr(reader->get_location()); + std::vector *thrd_lists = get_safe_ptr_vect_action(obj_thrd_map, reader->get_location()); unsigned int i; /* Iterate over all threads */ for (i = 0; i < thrd_lists->size(); i++) { @@ -1522,7 +1540,7 @@ bool ModelChecker::release_seq_heads(const ModelAction *rf, /* else relaxed write; check modification order for contiguous subsequence * -> rf must be same thread as release */ int tid = id_to_int(rf->get_tid()); - std::vector *thrd_lists = obj_thrd_map->get_safe_ptr(rf->get_location()); + std::vector *thrd_lists = get_safe_ptr_vect_action(obj_thrd_map, rf->get_location()); action_list_t *list = &(*thrd_lists)[tid]; action_list_t::const_reverse_iterator rit; @@ -1720,9 +1738,9 @@ void ModelChecker::add_action_to_lists(ModelAction *act) int tid = id_to_int(act->get_tid()); action_trace->push_back(act); - obj_map->get_safe_ptr(act->get_location())->push_back(act); + get_safe_ptr_action(obj_map, act->get_location())->push_back(act); - std::vector *vec = obj_thrd_map->get_safe_ptr(act->get_location()); + std::vector *vec = get_safe_ptr_vect_action(obj_thrd_map, act->get_location()); if (tid >= (int)vec->size()) vec->resize(priv->next_thread_id); (*vec)[tid].push_back(act); @@ -1733,9 +1751,9 @@ void ModelChecker::add_action_to_lists(ModelAction *act) if (act->is_wait()) { void *mutex_loc=(void *) act->get_value(); - obj_map->get_safe_ptr(mutex_loc)->push_back(act); + get_safe_ptr_action(obj_map, mutex_loc)->push_back(act); - std::vector *vec = obj_thrd_map->get_safe_ptr(mutex_loc); + std::vector *vec = get_safe_ptr_vect_action(obj_thrd_map, mutex_loc); if (tid >= (int)vec->size()) vec->resize(priv->next_thread_id); (*vec)[tid].push_back(act); @@ -1771,7 +1789,7 @@ ModelAction * ModelChecker::get_last_action(thread_id_t tid) const ModelAction * ModelChecker::get_last_seq_cst(ModelAction *curr) const { void *location = curr->get_location(); - action_list_t *list = obj_map->get_safe_ptr(location); + action_list_t *list = get_safe_ptr_action(obj_map, location); /* Find: max({i in dom(S) | seq_cst(t_i) && isWrite(t_i) && samevar(t_i, t)}) */ action_list_t::reverse_iterator rit; for (rit = list->rbegin(); rit != list->rend(); rit++) @@ -1791,7 +1809,7 @@ ModelAction * ModelChecker::get_last_seq_cst(ModelAction *curr) const ModelAction * ModelChecker::get_last_unlock(ModelAction *curr) const { void *location = curr->get_location(); - action_list_t *list = obj_map->get_safe_ptr(location); + action_list_t *list = get_safe_ptr_action(obj_map, location); /* Find: max({i in dom(S) | isUnlock(t_i) && samevar(t_i, t)}) */ action_list_t::reverse_iterator rit; for (rit = list->rbegin(); rit != list->rend(); rit++) @@ -2013,7 +2031,7 @@ void ModelChecker::compute_relseq_breakwrites(ModelAction *curr) */ void ModelChecker::build_reads_from_past(ModelAction *curr) { - std::vector *thrd_lists = obj_thrd_map->get_safe_ptr(curr->get_location()); + std::vector *thrd_lists = get_safe_ptr_vect_action(obj_thrd_map, curr->get_location()); unsigned int i; ASSERT(curr->is_read()); diff --git a/model.h b/model.h index 6e7f2244..85101fee 100644 --- a/model.h +++ b/model.h @@ -178,17 +178,17 @@ private: /** Per-object list of actions. Maps an object (i.e., memory location) * to a trace of all actions performed on the object. */ - HashTable *obj_map; + HashTable *obj_map; /** Per-object list of actions. Maps an object (i.e., memory location) * to a trace of all actions performed on the object. */ - HashTable *lock_waiters_map; + HashTable *lock_waiters_map; /** Per-object list of actions. Maps an object (i.e., memory location) * to a trace of all actions performed on the object. */ - HashTable *condvar_waiters_map; + HashTable *condvar_waiters_map; - HashTable, uintptr_t, 4 > *obj_thrd_map; + HashTable *, uintptr_t, 4 > *obj_thrd_map; std::vector< Promise *, SnapshotAlloc > *promises; std::vector< struct PendingFutureValue, SnapshotAlloc > *futurevalues;