[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vorbis-dev
Subject:    Re: [Vorbis-dev] Out of memory handling?
From:       xiphmont () xiph ! org
Date:       2012-01-18 10:03:26
Message-ID: CACrD=+9s59MVqTcKEP69+DQ3THbZhTJd+sL3MzQfBo0w5YhG1A () mail ! gmail ! com
[Download RAW message or body]

2011/11/7 G=E1bor Kov=E1cs <picard@movelex.hu>:
> Hi,
>
> As far as I see in libvorbis most of the places where _ogg_malloc(),
> _ogg_realloc and _ogg_calloc() is called the return value is not checked =
for
> out of memory condition. Is there any plan to change this?

Yes, in fact, for embedded systems.

> For my use-case the application is not allowed to crash. So if libvorbis =
can
> not handle this condition, I guess I would need to preallocate a large
> enough custom memory heap for all kind of vorbis files and override the o=
gg
> allocation macros.

On most general purpose systems, mallocs can't return NULL unless the
heap is corrupted.  Of course, that's not true for embedded and
special use OSes, so the code is in fact scheduled to change.

Monty
_______________________________________________
Vorbis-dev mailing list
Vorbis-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/vorbis-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic