+ memory.clear_cache();
+}
+
+/* ----------- Hashing logic -------------- */
+class djb_hash {
+ hash_type state_ = 5381LL;
+
+public:
+ template <class T> void update(T& x) { state_ = (state_ << 5) + state_ + x; }
+ hash_type value() const { return state_; }
+};
+hash_type Snapshot::do_hash() const
+{
+ XBT_DEBUG("START hash %ld", num_state_);
+ djb_hash hash;
+ // TODO:
+ // * nb_processes
+ // * heap_bytes_used
+ // * root variables
+ // * basic stack frame information
+ // * stack frame local variables
+ XBT_DEBUG("END hash %ld", num_state_);
+ return hash.value();