Skip to content

Commit

Permalink
Use fixed size allocator for AVL nodes.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/branches/avl_string_cache@45340 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
bacek committed Mar 31, 2010
1 parent c10a569 commit e9957fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/string/api.c
Expand Up @@ -796,7 +796,9 @@ Parrot_str_new_constant_ex(PARROT_INTERP, ARGIN_NULLOK(const char *buffer), UINT
return vv->value;

/* Not found. Allocate new node and insert */
vv = mem_gc_allocate_zeroed_typed(interp, AVLStringNode);
vv = (AVLStringNode*)Parrot_gc_allocate_fixed_size_storage(interp,
sizeof (AVLStringNode));
memset(vv, 0, sizeof (AVLStringNode));

/* Fill it */
vv->str = node.str;
Expand Down

0 comments on commit e9957fa

Please sign in to comment.