Re: OOM band-aid

Christer Weinigel (wingel@hog.ctrl-c.liu.se)
9 Oct 1998 06:40:52 -0000


Ely Wilson <plexus@ionet.net> wrote:
>> (Just my humble opinion of course, however...)
>And I get a 'well on some instances the memory may be requested but never
>used'.
>
>I think that with that something is seriously wrong. Why on earth woudl
>someone design a program to request memory it will never use?

For example somebody using IMNHO broken languages such as standard
Pascal that doesn't support dynamic memory allocation. One has to
compile the program with "enough" preallocated for any reasonable
purpose, even if only a fraction of it will be used.

For example, TeX is one such application, it really ought to allocate
memory dynamically when needed, but since it's written in standard
Pascal it can't do this:

(constants from an old version of the TeX source)
mem_max = 30000; { greatest index in TeX's internal mem array }
font_mem_size = 20000; { number of words of font-info for all fonts }

So it's really useful to be able to set mem_max to something really
large, so that no normal TeX document will reach this limit, and at
the same time know that since memory is allocated only when
referenced, this won't make the system crawl.

/Christer

-- 
If it's tourist season, why can't we shoot them?

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/