snapshot v3/p3; WIP

This commit is contained in:
Gregory Burd 2024-03-28 19:41:28 -04:00
parent 5bc9ec7147
commit 0f79e5a5ec
2 changed files with 10 additions and 6 deletions

View file

@ -27,7 +27,7 @@
#define INTEGRITY_CHK ((void)0)
#endif
//define SNAPSHOTS
#define SNAPSHOTS
#define DOT
#define TEST_ARRAY_SIZE 10

View file

@ -1139,10 +1139,14 @@
return rc; \
\
/* (b) shallow copy */ \
memcpy(dest, src, sizeof(decl##_node_t)); \
size_t sle_arr_sz = sizeof(struct __skiplist_##decl_entry) * slist->slh_max; \
memcpy(dest, src, sizeof(decl##_node_t) + sle_arr_sz); \
\
/* (d) adjust pointer to sle_next for this node */ \
dest->field.sle_next = (decl##_node_t **)((uintptr_t)dest + sizeof(decl##_node_t)); \
\
if (!(src == slist->slh_head || src == slist->slh_tail)) { \
/* (d) deep copy */ \
/* (e) deep copy */ \
archive_node_blk; \
if (rc) { \
prefix##skip_free_node_##decl(dest); \