table = (struct hashlistnode<_Key,_Val> **) calloc(initialcapacity, sizeof(struct hashlistnode<_Key,_Val> *));
loadfactor = factor;
capacity = initialcapacity;
- threshold = initialcapacity*loadfactor;
+ threshold = (unsigned int) (initialcapacity*loadfactor);
mask = (capacity << _Shift)-1;
size = 0; // Initial number of elements in the hash
}
table = newtable; //Update the global hashtable upon resize()
capacity = newsize;
- threshold = newsize * loadfactor;
+ threshold = (unsigned int) (newsize * loadfactor);
mask = (newsize << _Shift)-1;
for(unsigned int i = 0; i < oldcapacity; i++) {
#include "common.h"
#include "threads.h"
+#include "datarace.h"
+
/* global "model" object */
#include "model.h"
#include "snapshot-interface.h"
void real_main() {
thrd_t user_thread;
ucontext_t main_context;
+ //Initialize race detector
+ initRaceDetector();
//Create the singleton SnapshotStack object
snapshotObject = new SnapshotStack();