Completely removed the entire representation tree from the GUI . . .
. . . and am redesigning it. First off, a few definitions of the terms that
I'm using:
+ Event: Single modification of the representation, such as a block
allocation
+ Snapshot: Complete representation of the program's memory for a given point
in time
Now, for what I'm thinking for the new design . . . the most radical change is
the method of storing the blocks (references will be stored in a similar
manner as well), which is a tree, rather than a flat container. Something
along the lines of this:
|
| |
| | |
Block Block Block
A snapshot is simply a "head" element of a tree. Each tree node stores an ID,
the ID of the snapshot that last modified it. In that way, a sort of copy-on-
write algorithm is implemented.
Each snapshot stores a list of events that follow it. As such, an exact
representation of the program's memory at any given point is stored, without
an exorbitant amount of memory used. The event list can also be removed
without undue harm to the tree other than the removal of accuracy . . .
A list of snapshots is required as well, of course . . .
So, the classes that are required:
+ Event
+ EventList
+ Snapshot
+ SnapshotList
SnapshotList does not share any code with EventList (or, at least, very
little . . . perhaps the "class" keyword?), so it is a distinct class unto
itself. EventLists additionally need to store the snapshots directly before
and after them.
As for Events . . . regarding blocks, there are only two event types required,
block creation and block removal -- a resize is simply the removal of the old
block, and another block inserted . . . AllocBlock and FreeBlock, I suppose.
I think that's about it for the moment . . . time to get to work.
37 files changed: