Mercurial > mplayer.hg
comparison configure @ 33644:c15dabfa2380
Do a proper calculation of free RAM to be used as V4L buffers.
The code uses sysinfo to query the available RAM, however it used
ancient form available is some early development 2.3.x kernels.
Newer form reports the size in memory units (usually same as page size),
as result the code would fallback to 2 buffers even on multi GB system.
The commit does: Improve the check in configure to ensure that we
do use sysinfo struct with present mem_unit. Use free ram instead of
total ram (to avoid swapping). Tweak memory constants and simplify code.
author | iive |
---|---|
date | Sun, 26 Jun 2011 14:42:35 +0000 |
parents | 311468e8af65 |
children | 41061dfd72d4 |
comparison
equal
deleted
inserted
replaced
33643:311468e8af65 | 33644:c15dabfa2380 |
---|---|
3995 fi #if sunos | 3995 fi #if sunos |
3996 | 3996 |
3997 | 3997 |
3998 echocheck "sys/sysinfo.h" | 3998 echocheck "sys/sysinfo.h" |
3999 _sys_sysinfo=no | 3999 _sys_sysinfo=no |
4000 statement_check sys/sysinfo.h 'struct sysinfo s_info; sysinfo(&s_info)' && _sys_sysinfo=yes | 4000 statement_check sys/sysinfo.h 'struct sysinfo s_info; s_info.mem_unit=0; sysinfo(&s_info)' && _sys_sysinfo=yes |
4001 if test "$_sys_sysinfo" = yes ; then | 4001 if test "$_sys_sysinfo" = yes ; then |
4002 def_sys_sysinfo_h='#define HAVE_SYS_SYSINFO_H 1' | 4002 def_sys_sysinfo_h='#define HAVE_SYS_SYSINFO_H 1' |
4003 else | 4003 else |
4004 def_sys_sysinfo_h='#undef HAVE_SYS_SYSINFO_H' | 4004 def_sys_sysinfo_h='#undef HAVE_SYS_SYSINFO_H' |
4005 fi | 4005 fi |