[Tremor] looking for test vectors that hit specific parts of codebook.c and res012.c for memory analysis
Ethan Bordeaux
ethan.bordeaux at gmail.com
Mon Jan 19 13:08:42 PST 2009
Hi everyone - I'm working a static allocation model for Tremor for an
embedded project. I'm moved most of the allocations to a static memory
structure inside OggVorbis_File except for dec_table which remains mapped to
the pseudo-allocator which was posted here a couple months ago. The order
of data in dec_table is such that it's hard to make an optimal static memory
structure so I just allow the allocator to handle that portion of the memory
management. Anyways, one problem I have is that my test vectors don't cause
execution to reach every place where there is a malloc/calloc/alloca (I know
alloca is stack but I need to protect that from growth too) so I can't
profile and remove them from the code. Can anyone tell me if these
locations are ever reached/what version/setup of Ogg encoder I would need to
use to hit these specific alloc calls?
codebook.c:
s->dec_table=_ogg_malloc((s->used_entries*2+1)*sizeof(*work), vf); // near
start of make_decode_table
s->q_val=_ogg_malloc(quantvals, vf); // near decision to use dec_type 2 in
vorbis_book_unpack()
s->q_val=_ogg_malloc(quantvals*2, vf); // just after the call above that is
missed
s->q_val=_ogg_malloc(s->q_pack*s->used_entries, vf); // near decision to use
dec_type 3
ogg_int32_t *v = (ogg_int32_t *)alloca(sizeof(*v)*book->dim); // near start
of vorbis_book_decodevs_add()
ogg_int32_t *v = (ogg_int32_t *)alloca(sizeof(*v)*book->dim); // near start
of vorbis_book_decodev_add()
ogg_int32_t *v = (ogg_int32_t *)alloca(sizeof(*v)*book->dim); // near start
of vorbis_book_decodev_set()
res012.c
**partword=(char **)alloca(ch*sizeof(*partword)); // in res_inverse() if
info->type<2
partword[j]=(char
*)alloca(partwords*partitions_per_word*sizeof(*partword[j])); // in
res_inverse() if info->type<2
Lastly, what version of the Ogg encoder uses floor0?
Thanks everyone!
Ethan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/tremor/attachments/20090119/38b6ce74/attachment.htm
More information about the Tremor
mailing list