Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Initial preparations for repossessions table in serialization.
  • Loading branch information
jnthn committed Feb 28, 2012
1 parent 608ee61 commit d3c7cd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/6model/serialization.c
Expand Up @@ -19,12 +19,13 @@
#define CURRENT_VERSION 1

/* Various sizes (in bytes). */
#define HEADER_SIZE 4 * 14
#define HEADER_SIZE 4 * 16
#define DEP_TABLE_ENTRY_SIZE 8
#define STABLES_TABLE_ENTRY_SIZE 8
#define OBJECTS_TABLE_ENTRY_SIZE 16
#define CLOSURES_TABLE_ENTRY_SIZE 24
#define CONTEXTS_TABLE_ENTRY_SIZE 12
#define REPO_TABLE_ENTRY_SIZE 16

/* Some guesses. */
#define DEFAULT_STABLE_DATA_SIZE 4096
Expand Down
5 changes: 5 additions & 0 deletions src/6model/serialization.h
Expand Up @@ -40,6 +40,10 @@ typedef struct {
char *contexts_table;
char *contexts_data;

/* The number of repossessions and pointer to repossessions table. */
Parrot_Int4 num_repos;
char *repos_table;

/* Array of STRINGs. */
PMC *string_heap;
} SerializationRoot;
Expand Down Expand Up @@ -118,6 +122,7 @@ typedef struct SerializationWriter {
Parrot_Int4 closures_table_alloc;
Parrot_Int4 contexts_table_alloc;
Parrot_Int4 contexts_data_alloc;
Parrot_Int4 repos_table_alloc;

/* Current offsets for the data chunks (also correspond to the amount of
* data written in to them). */
Expand Down

0 comments on commit d3c7cd7

Please sign in to comment.