Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Merging PMDebugger into Pmemcheck #83

Open
wants to merge 11 commits into
base: pmem-3.15
Choose a base branch
from
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.vscode/
*.o

.DS_Store
# /
/.in_place
/.vs
Expand Down
16 changes: 15 additions & 1 deletion pmemcheck/pmc_include.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,24 @@

#ifndef PMC_INCLUDE_H
#define PMC_INCLUDE_H
/** Metadata structure for store information array */
struct arr_md {
UWord end_index; //Index of current free metadata
Addr min_addr;
Addr max_addr;
UWord start_index;
enum flushed_state
{
NO_FLUSHED,
PART_FLUSHED,
ALL_FLUSHED,
} state;
};


/** Single store to memory. */
struct pmem_st {
Bool is_delete;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, please ensure that is data structure is as compact as possible. If the Bool type is 1 byte, then, as @krzycz pointed out, this wastes tons of memory for alignment.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this 'is_delete' flag and now I use 'address size = 0' to mark a persistent memory info as deleted

Addr addr;
ULong size;
ULong block_num;
Expand All @@ -33,7 +48,6 @@ struct pmem_st {
/*------------------------------------------------------------*/
/*--- Common functions ---*/
/*------------------------------------------------------------*/

/* Check if the given region is in the set. */
UWord is_in_mapping_set(const struct pmem_st *region, OSet *region_set);

Expand Down
Loading