Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 130889 | Differences between
and this patch

Collapse All | Expand All

(-)jmemansi.c.orig (-1 / +9 lines)
Lines 12-17 Link Here
12
 * is shoved onto the user.
12
 * is shoved onto the user.
13
 */
13
 */
14
14
15
#include <unistd.h>
16
15
#define JPEG_INTERNALS
17
#define JPEG_INTERNALS
16
#include "jinclude.h"
18
#include "jinclude.h"
17
#include "jpeglib.h"
19
#include "jpeglib.h"
Lines 157-163 Link Here
157
GLOBAL(long)
159
GLOBAL(long)
158
jpeg_mem_init (j_common_ptr cinfo)
160
jpeg_mem_init (j_common_ptr cinfo)
159
{
161
{
160
  return DEFAULT_MAX_MEM;	/* default for max_memory_to_use */
162
    long phys_size;
163
164
    if ((phys_size = sysconf(_SC_PHYS_PAGES)) == -1)
165
        return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
166
    if ((phys_size *= sysconf(_SC_PAGESIZE)) < 0)
167
        return DEFAULT_MAX_MEM;
168
    return (long) (phys_size * 0.95);
161
}
169
}
162
170
163
GLOBAL(void)
171
GLOBAL(void)

Return to bug 130889