Thread View: att.unix
1 messages
1 total messages
Started by C.NORTHRUP
Fri, 14 Apr 1989 14:04
A Danger Message From UNIX
Author: C.NORTHRUP
Date: Fri, 14 Apr 1989 14:04
Date: Fri, 14 Apr 1989 14:04
61 lines
1919 bytes
1919 bytes
------------------------------------------
OK people, this should be a interesting question for you.....
First, some background:
We have a simple program with the following code fragment:
for(i=0;i<4096;++i)
if( (memptr[i] = malloc(80540)) == (char *) NULL)
{
perror("mt");
break;
}
Now, the scenario:
While running multiple versions of this in the background,
(loged on as a general user) the following message started
appearing on the system console:
DANGER: out of swap space.
Finally, the question:
Since the five (or so) invocations of the program consumed
minimal space prior to the mallocs, how should the OS
have handled this? Should the mallocs have failed?
Or is this considered acceptable.
NOTE 1: I know that increasing the swap space would make the problem
go away, but that is not what I need to know... The real
question is how should the OS handle this.....
NOTE 2: This happened on a Motorola VME147A running 5.3
- charlie northrup
homxb!cjn
at&t bell labs
480 red hill road
middletown, nj
(201)615-4508
** standard disclaimer implied
*********************************
"Hank is the type of person you buy for what he is worth, and sell
for what he thinks he is worth. That is how you make money."
- ajn '84
*********************************
"A redneck is a cowboy with an attitude problem"
- dillard '88
*********************************
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads