in reply to die rather than exit on out-of-memory failure?
There is ... ahem ... a relatively simple solution to that “problem,” to wit:
Do not attempt to allocate a data-object of that size.
What you are actually doing, in such a situation, is “allocating a disk file the hard way.” All storage used by a process is, after all, &dquo;virtual storage,” and this means “disk file.” The virtual storage subsystem is not designed to handle a process hitting 200 megabytes’ worth of 4K pages all at once.
Such data should be stored in disk files. Those files can be processed in a variety of ways, such as the tie mechanism, or by mapping portions of them into the virtual-storage space, but one must never completely forget the purely physical aspects of disk storage: transfer time, rotational latency, and seek time.
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: die rather than exit on out-of-memory failure?
by chm (Novice) on Jan 04, 2011 at 03:05 UTC | |
by karlglazebrook (Initiate) on Jan 04, 2011 at 03:30 UTC | |
|
Re^2: die rather than exit on out-of-memory failure?
by Anonymous Monk on Jan 04, 2011 at 03:02 UTC | |
by locked_user sundialsvc4 (Abbot) on Jan 05, 2011 at 03:33 UTC |