[svn:parrot] r44314 - branches/boehm_gc_2/src
bacek at svn.parrot.org
bacek at svn.parrot.org
Mon Feb 22 21:35:13 UTC 2010
Author: bacek
Date: Mon Feb 22 21:35:12 2010
New Revision: 44314
URL: https://trac.parrot.org/parrot/changeset/44314
Log:
Use zeroed allocations in PackFiles
Modified:
branches/boehm_gc_2/src/packfile.c
Modified: branches/boehm_gc_2/src/packfile.c
==============================================================================
--- branches/boehm_gc_2/src/packfile.c Mon Feb 22 21:34:51 2010 (r44313)
+++ branches/boehm_gc_2/src/packfile.c Mon Feb 22 21:35:12 2010 (r44314)
@@ -4455,7 +4455,7 @@
self->groups = mem_gc_realloc_n_typed_zeroed(interp, self->groups,
1 + self->num_groups, self->num_groups, PackFile_Annotations_Group *);
else
- self->groups = mem_gc_allocate_n_typed(interp,
+ self->groups = mem_gc_allocate_n_zeroed_typed(interp,
1 + self->num_groups, PackFile_Annotations_Group *);
/* Store details. */
@@ -4511,11 +4511,12 @@
self->keys = mem_gc_realloc_n_typed_zeroed(interp, self->keys,
1 + self->num_keys, self->num_keys, PackFile_Annotations_Key *);
else
- self->keys = mem_gc_allocate_n_typed(interp,
+ self->keys = mem_gc_allocate_n_zeroed_typed(interp,
1 + self->num_keys, PackFile_Annotations_Key *);
key_id = self->num_keys;
- self->keys[key_id] = mem_gc_allocate_typed(interp, PackFile_Annotations_Key);
+ self->keys[key_id] = mem_gc_allocate_zeroed_typed(interp,
+ PackFile_Annotations_Key);
self->num_keys++;
/* Populate it. */
@@ -4533,14 +4534,14 @@
/* Add annotations entry. */
if (self->entries)
- self->entries = mem_gc_realloc_n_typed(interp, self->entries,
- 1 + self->num_entries, PackFile_Annotations_Entry *);
+ self->entries = mem_gc_realloc_n_typed_zeroed(interp, self->entries,
+ 1 + self->num_entries, self->num_entries, PackFile_Annotations_Entry *);
else
- self->entries = mem_gc_allocate_n_typed(interp,
+ self->entries = mem_gc_allocate_n_zeroed_typed(interp,
1 + self->num_entries, PackFile_Annotations_Entry *);
self->entries[self->num_entries] =
- mem_gc_allocate_typed(interp, PackFile_Annotations_Entry);
+ mem_gc_allocate_zeroed_typed(interp, PackFile_Annotations_Entry);
self->entries[self->num_entries]->bytecode_offset = offset;
self->entries[self->num_entries]->key = key_id;
self->entries[self->num_entries]->value = value;
More information about the parrot-commits
mailing list