develooper Front page | perl.perl5.porters | Postings from January 2006

[patch] arena rework - arena sets

Thread Next
From:
Jim Cromie
Date:
January 31, 2006 03:52
Subject:
[patch] arena rework - arena sets
Message ID:
43DF4F66.4080808@gmail.com

this patch adds arena_sets:

/*
  ARENASETS: A meta-arena implementation which separates arena memory
  blocks from the arena-info which describes it.  The struct arena_set
  contains an array of struct arena_descs, each holding info for a
  single arena.  By separating the meta-info from the arena, we
  recover the arenas' 1st slots, formerly borrowed for list
  management. This amounts to ~1.7% for CV bodies, less for others.

  The array of arena-descs is sized so that the arena_set is about the
  size of an arena, avoiding the malloc overhead of a naive
  non-intrusive linked-list.  The cost is 1 arena-set malloc per ~320
  arena-mallocs, + the unused memory in the last arena-set (1/2 on
  average).

  union arena is declared with a fixed size, but is intended to vary
  by type, allowing their use for big, rare body-types where theres
  currently too much wastage (unused arena slots)
*/

everything is ifdefd to make it easy to make things optional,

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About