[MPlayer-dev-eng] possible bug in demux_mov.c

Daniel Egger degger at fhm.edu
Mon Apr 21 23:07:16 CEST 2003


Am Mon, 2003-04-21 um 22.13 schrieb Arpi:

> > That's plain wrong. Maybe you're confusing it with mmap?

There's a "linux specific" optimisation that allows it to return
a non-NULL value in such cases however that's not normal.

int main (void)
{
  void *a;
 
  a = malloc (800*1024*1024);
  printf ("%p\n", a);
}

egger at sonja:~$ ./test
(nil)

int main (void)
{
  void *a;
 
  a = malloc (700*1024*1024);
  printf ("%p\n", a);
}

egger at sonja:~$ ./test
0x30027008

You're terminating because you're teasing the OOM logic, not because
you're allocating too much memory at once.

This also depends on the allocator.

-- 
Servus,
       Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030421/fc602d34/attachment.pgp>


More information about the MPlayer-dev-eng mailing list