more reading H&S V

F

Frank

I had to deal with the American health care system today, as I
required health care. I amaze that there exist people who think it
isn't already rationed.

So I came to page 220 H&S, where they give the following example.

extern char *alloc();
struct S *p;
p = (struct S *) alloc(sizeof (struct S));

What does this do?
 
S

Sjouke Burry

Frank said:
I had to deal with the American health care system today, as I
required health care. I amaze that there exist people who think it
isn't already rationed.

So I came to page 220 H&S, where they give the following example.

extern char *alloc();
struct S *p;
p = (struct S *) alloc(sizeof (struct S));

What does this do?
It feeds you an aspirin.
 
S

spinoza1111

I had to deal with the American health care system today, as I
required health care.  I amaze that there exist people who think it
isn't already rationed.

Indeed it is, according to income. The "death panels" are bastards in
insurance companies paid to deny you coverage. They use crap data
systems written partly in bad programming languages like MUMPS and C
since they don't care if your information is lost or corrupted by C
memory links or MUMPS' primitive strings, as long as they can print
out some excuse to deny you coverage.

They employ creepy little programmers who learned a fragment of one
language years ago who sit around changing the code until the "user is
happy", and in an insurance company all this means, in many cases, is
that the user is denying coverage to people dying of cancer.

The circuits of American computers are soaked in the blood of the
working man.
So I came to page 220 H&S, where they give the following example.

extern char *alloc();
struct S *p;
p = (struct S *) alloc(sizeof (struct S));

What does this do?

It allocates a cluster of bytes equal in size to the space taken by
the structure named S, converts the address returned by alloc to a
pointer to S, and places that pointer in p. Unless alloc was munged by
some incompetent to do something totally different in order to give
some death panel in some insurance company the denial ratio they want.
 
B

Barry Schwarz

I had to deal with the American health care system today, as I
required health care. I amaze that there exist people who think it
isn't already rationed.

So I came to page 220 H&S, where they give the following example.

extern char *alloc();
struct S *p;
p = (struct S *) alloc(sizeof (struct S));

What does this do?

Since alloc is not a standard function and since you just started
reading H&S, maybe you should look back in the book and see what it is
defined to do.
 
F

Frank

Since alloc is not a standard function and since you just started
reading H&S, maybe you should look back in the book and see what it is
defined to do.

I just leafed through it again, but I don't remember seeing an alloc()
before. I would presume that the function malloc's the appropriate
space for struct S. Why the cast after it does this?
 
F

Frank

Since alloc is not a standard function and since you just started
reading H&S, maybe you should look back in the book and see what it is
defined to do.

I just leafed through it again, but I don't remember seeing an alloc()
before. I would presume that the function malloc's the appropriate
space for struct S. Why the cast after it does this?
 
F

Frank

Since alloc is not a standard function and since you just started
reading H&S, maybe you should look back in the book and see what it is
defined to do.

I just leafed through it again, but I don't remember seeing an alloc()
before. I would presume that the function malloc's the appropriate
space for struct S. Why the cast after it does this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,096
Latest member
ThurmanCre

Latest Threads

Top