[MPlayer-dev-eng] [RFC] libnut demuxer API
Aurelien Jacobs
aurel at gnuage.org
Wed Sep 7 23:44:39 CEST 2005
On Wed, 7 Sep 2005 08:45:59 +0300
Oded Shimon <ods15 at ods15.dyndns.org> wrote:
> On Wed, Sep 07, 2005 at 12:12:43AM -0400, Rich Felker wrote:
> > On Tue, Sep 06, 2005 at 09:42:53PM +0300, Oded Shimon wrote:
> > > // Demuxer
> > >
> > > /** Just inits stuff, can never fail. */
> > > NUTContext * nut_demuxer_init(InputStreamContext isc);
> >
> > I assume this mallocs something? If so, "can never fail" is
> > misleading. :)
>
> ahem, yes, malloc :)
> even if you run out of ram, in linux, malloc STILL doesn't fail :P
That's plain wrong !!
aurel at homer:~/x$ uname -a
Linux homer 2.6.13 #1 Mon Aug 29 13:10:21 CEST 2005 x86_64 GNU/Linux
aurel at homer:~/x$ cat /proc/sys/vm/overcommit_memory
0
aurel at homer:~/x$ free
total used free shared buffers cached
Mem: 511040 497960 13080 0 22716 194004
-/+ buffers/cache: 281240 229800
Swap: 618420 0 618420
aurel at homer:~/x$ cat x.c
#include <stdlib.h>
#include <stdio.h>
int
main (int argc, char **argv)
{
printf ("%p\n", malloc (atoi (argv[1])));
return 0;
}
aurel at homer:~/x$ gcc -Wall -o x x.c
aurel at homer:~/x$ ./x 100000000
0x2aaaaae02010
aurel at homer:~/x$ ./x 1000000000
(nil)
Aurel
More information about the MPlayer-dev-eng
mailing list