473,396 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

malloc() implementation

Hello together,

We have to make our own implementation of malloc() under Linux. Does
anybody can give me a hint where to start?

Our implementation should only work under Linux.

Thanks

Karsten

May 31 '06 #1
49 23111

Karsten Jung wrote:
Hello together,

We have to make our own implementation of malloc() under Linux. Does
anybody can give me a hint where to start?
libc? <www.gnu.org/software/libc/>
Our implementation should only work under Linux.


May 31 '06 #2
Karsten Jung wrote:
Hello together,

We have to make our own implementation of malloc() under Linux. Does
anybody can give me a hint where to start?

Our implementation should only work under Linux.


Read the glibc code (if "pollution" from LGPL code is not a problem) and
ask on a Linux group, remembering that you will have to write your own
free and realloc code, and you have to deal with the issue of whether
other library routines are calling your malloc or the standard one.
Personally I would not bother without a *very* good reason (which might
exist).

You can't write a malloc routine in standard C which might be part of
why it is in the standard library, hence the suggestion of asking in a
Linux group.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
May 31 '06 #3
Flash Gordon <sp**@flash-gordon.me.uk> writes:
You can't write a malloc routine in standard C which might be part of
why it is in the standard library, hence the suggestion of asking in a
Linux group.


What you *can* do though is statically allocate a memory buffer, then
allocate out of that with your own "malloc".

--

John Devereux
May 31 '06 #4
Read C Programming Kerninghan & Ritchie you will get the idea.

May 31 '06 #5
Haider wrote:
Read C Programming Kerninghan & Ritchie you will get the idea.


Get the idea about what? Please provide context when responding, there
is no guarantee that people can see the post you are replying to.

In any case, last time I looked I'm sure that K&R did not describe how
to implement malloc which is what the subject line of this thread is..
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
May 31 '06 #6
John Devereux wrote:
Flash Gordon <sp**@flash-gordon.me.uk> writes:
You can't write a malloc routine in standard C which might be part of
why it is in the standard library, hence the suggestion of asking in a
Linux group.


What you *can* do though is statically allocate a memory buffer, then
allocate out of that with your own "malloc".


True, as long as you call is something other than malloc ;-)
It all depends on what the OP actually wants to achieve.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
May 31 '06 #7
Flash Gordon said:
Haider wrote:
Read C Programming Kerninghan & Ritchie you will get the idea.


Get the idea about what? Please provide context when responding, there
is no guarantee that people can see the post you are replying to.

In any case, last time I looked I'm sure that K&R did not describe how
to implement malloc which is what the subject line of this thread is..


See Chapter 8, specifically section 8.7.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
May 31 '06 #8
In article <ju************@news.flash-gordon.me.uk>,
Flash Gordon <sp**@flash-gordon.me.uk> wrote:
Read C Programming Kerninghan & Ritchie you will get the idea.
Get the idea about what? Please provide context when responding, there
is no guarantee that people can see the post you are replying to.
It's a good answer to almost every on-topic question in comp.lang.c,
so the context doesn't matter :-)
In any case, last time I looked I'm sure that K&R did not describe how
to implement malloc which is what the subject line of this thread is..


It describes the implementation of a "rudimentary" storage allocator
as an example in the section on Address Arithmetic (5.4).

-- Richard
May 31 '06 #9
Richard Tobin wrote:
In article <ju************@news.flash-gordon.me.uk>,
Flash Gordon <sp**@flash-gordon.me.uk> wrote:
Read C Programming Kerninghan & Ritchie you will get the idea.
Get the idea about what? Please provide context when responding, there
is no guarantee that people can see the post you are replying to.


It's a good answer to almost every on-topic question in comp.lang.c,
so the context doesn't matter :-)


The standard and the FAQ are better answers ;-)
In any case, last time I looked I'm sure that K&R did not describe how
to implement malloc which is what the subject line of this thread is..


It describes the implementation of a "rudimentary" storage allocator
as an example in the section on Address Arithmetic (5.4).


My reply was still technically accurate, I was sure of what I stated. It
just happens that I was wrong to be sure of it ;-)
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
May 31 '06 #10

Karsten Jung wrote:
Hello together,

We have to make our own implementation of malloc() under Linux. Does
anybody can give me a hint where to start?

Our implementation should only work under Linux.

Thanks

Karsten


This may help, http://gee.cs.oswego.edu/dl/html/malloc.html

-kyle

May 31 '06 #11
Flash Gordon wrote:
John Devereux wrote:
Flash Gordon <sp**@flash-gordon.me.uk> writes:
You can't write a malloc routine in standard C which might be part of
why it is in the standard library, hence the suggestion of asking in a
Linux group.


What you *can* do though is statically allocate a memory buffer, then
allocate out of that with your own "malloc".


True, as long as you call is something other than malloc ;-)
It all depends on what the OP actually wants to achieve.


Wouldn't interpositioning allow you to define a default global symbol
"malloc" that would essentially overwrite the Standard one?

Not, mind you, something I recommend, but isn't one of the hallmarks of
C that one can do this without constraint, making all code (including
any external libs that are linked in later) use the non-standard function?
May 31 '06 #12
Clever Monkey <cl**************@hotmail.com.invalid> writes:
Flash Gordon wrote:
John Devereux wrote:
Flash Gordon <sp**@flash-gordon.me.uk> writes:

You can't write a malloc routine in standard C which might be part of
why it is in the standard library, hence the suggestion of asking in a
Linux group.

What you *can* do though is statically allocate a memory buffer, then
allocate out of that with your own "malloc".

True, as long as you call is something other than malloc ;-)
It all depends on what the OP actually wants to achieve.


Wouldn't interpositioning allow you to define a default global symbol
"malloc" that would essentially overwrite the Standard one?


If the implementation happens to support it, but such support is not
required by the standard.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
May 31 '06 #13
Karsten Jung wrote:
Hello together,
Who is 'together'?
We have to make our own implementation of malloc() under Linux. Does
anybody can give me a hint where to start?
Oh I don't know... maybe a linux group!!
Our implementation should only work under Linux.


Then why are you posting this to comp.lang.c?

Please try reading FAQs and welcome messages, then try lurking to get
the feel of a group, before you blindly post off topic requests.

--
Peter

May 31 '06 #14
Peter Nilsson schrieb:
Karsten Jung wrote:
Hello together,


Who is 'together'?


Consider it a quirk of word-by-word translation; the OP
probably meant "Hello everybody"/"Hi all".

<snip>

Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
May 31 '06 #15
Clever Monkey wrote:
Flash Gordon wrote:
John Devereux wrote:
Flash Gordon <sp**@flash-gordon.me.uk> writes:

You can't write a malloc routine in standard C which might be part of
why it is in the standard library, hence the suggestion of asking in a
Linux group.
What you *can* do though is statically allocate a memory buffer, then
allocate out of that with your own "malloc".

True, as long as you call is something other than malloc ;-)
It all depends on what the OP actually wants to achieve.

Wouldn't interpositioning allow you to define a default global symbol
"malloc" that would essentially overwrite the Standard one?

Not, mind you, something I recommend, but isn't one of the hallmarks of
C that one can do this without constraint, making all code (including
any external libs that are linked in later) use the non-standard function?


"Hallmark of C ..." Fuzzy concept, that. Yet the Rationale
invokes the "Spirit of C," so perhaps we can dither a bit without
risk of too much castigation.

In my own (less than universal) experience, two obstacles to
interposing your own malloc() -- or sqrt(), or whatever -- are
fairly frequently found:

- The Standard library may be incorporated into the program
as an indivisible unit: You get the whole thing, or nothing
at all. This is/was the case on VMS in the Old Days, when
the whole schmear was implemented as one giant monolithic
shared library. VMS' linker would squawk about conflicting
symbol definitions if your home-grown malloc() had the same
name as the malloc() in the library.

- The library itself may use unadvertised knowledge of its own
internals. (It pretty much must do so if things like atexit()
and fflush(NULL) are to work.) For example, imagine an fopen()
that for performance reasons wants to allocate an I/O buffer
on a memory page boundary. It might call a library-private
_malloc_pages() function to get such specially-aligned memory.
Fine so far: You haven't replaced _malloc_pages(), so the
library's own version is used. But what if fopen() then hands
the buffer memory to free()? It's (presumably) your free(),
not the library's free(), that gets called -- and what are
the chances that your free() and the library's free() use
identical data structures?

It's a shame, really, that C doesn't have a mechanism to allow
overriding parts of the library. Because abuses of dynamic memory
are so common, the malloc() suite is perhaps the most mouth-watering
override target, but there are others: A gets() that bleats whenever
called, or a scanf() that complains if given a "%s", even an acos()
that dumps a stack trace if its argument is larger than 1. The C
Standard, though, makes a point of separating the roles of implementor
and user -- and having lived on both sides of that fence, I for one
find the fence something of a comfort.

--
Eric Sosman
es*****@acm-dot-org.invalid
Jun 1 '06 #16
Karsten Jung wrote:

We have to make our own implementation of malloc() under Linux.
Does anybody can give me a hint where to start?

Our implementation should only work under Linux.


My nmalloc for DJGPP should be close. It basically depends on the
presence of sbrk and some ability to make meaning conversion
between char* and void*. The debuggery (which is not present in
the final version unless enabled) has other dependencies, including
some on the use of gcc.

<http://cbfalconer.home.att.net/download/>

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
Jun 1 '06 #17
Haider wrote:

Read C Programming Kerninghan & Ritchie you will get the idea.


For what? In general on usenet you should realize that readers may
very well not have convenient access to previous articles in a
thread. That means that your reply articles should include
adequate context, so that they stand by themselves. Google is NOT
usenet, it is only a very poor interface to the real usenet
system. To include proper context when using google, see my sig.
below. Please be sure to read the referenced URLs.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
Jun 1 '06 #18

Flash Gordon wrote:
Haider wrote:
Read C Programming Kerninghan & Ritchie you will get the idea.


Get the idea about what? Please provide context when responding, there
is no guarantee that people can see the post you are replying to.

In any case, last time I looked I'm sure that K&R did not describe how
to implement malloc which is what the subject line of this thread is..
--


Hi,
Please go to the following link you will get a copy of K&R in pdf
format
www.oberon2005.ru/paper/kr_c.pdf
then go to the page no 149 to 152 and you will get the idea of
implementation of malloc.
otherwise if you already have a copy of second edition of K&R then it
is in section 7 of chapter 8.
also K&R will give you an Idea about everything.

Jun 1 '06 #19

Richard Tobin wrote:
In article <ju************@news.flash-gordon.me.uk>,
Flash Gordon <sp**@flash-gordon.me.uk> wrote:
Read C Programming Kerninghan & Ritchie you will get the idea.
Get the idea about what? Please provide context when responding, there
is no guarantee that people can see the post you are replying to.


It's a good answer to almost every on-topic question in comp.lang.c,
so the context doesn't matter :-)


well said
for those whose blood group is C K&R is iron suppliment.
In any case, last time I looked I'm sure that K&R did not describe how
to implement malloc which is what the subject line of this thread is..


It describes the implementation of a "rudimentary" storage allocator
as an example in the section on Address Arithmetic (5.4).

-- Richard

also K&R will give you an Idea about everything.

Jun 1 '06 #20
Haider said:
Please go to the following link you will get a copy of K&R in pdf
format


That's incitement to copyright violation.

I've sent a complaint to gr**********@google.com - hopefully they can
explain to Haider about "intellectual property". Perhaps others here would
care to do the same.

I have also sent a note to the relevant person at Prentice-Hall, advising
him of the existence of this illicit electronic copy of K&R.

Not wanting to send him duff gen, I checked the file first. It is indeed a
copy of K&R, but it is a very poor-quality copy. Learners of C would be
much better served by buying a paper copy of K&R. This is better because:

(a) you can read it with a clear conscience;
(b) you can read it independently of any electronic device - no batteries
required;
(c) you can be sure that you have the correct text;
(d) you can look things up much more quickly.

Actually, (d) surprised me. But it's true. Having a copy of K&R right there
on the desk in front of me, I find myself reaching for it when I need to
check, say, which way round args 2 and 3 to fread/fwrite go, because it's
actually less hassle than firing up a terminal, loading the Standard into a
searchable viewer of some kind, and typing in my search criteria.

If you haven't got a paper copy of K&R2, pick up the phone, get on to your
bookshop, and order one *today*.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jun 1 '06 #21
Eric Sosman wrote:
Clever Monkey wrote:
Flash Gordon wrote:
John Devereux wrote:

Flash Gordon <sp**@flash-gordon.me.uk> writes:

> You can't write a malloc routine in standard C which might be part of
> why it is in the standard library, hence the suggestion of asking in a
> Linux group.
What you *can* do though is statically allocate a memory buffer, then
allocate out of that with your own "malloc".
True, as long as you call is something other than malloc ;-)
It all depends on what the OP actually wants to achieve.

Wouldn't interpositioning allow you to define a default global symbol
"malloc" that would essentially overwrite the Standard one?

Not, mind you, something I recommend, but isn't one of the hallmarks
of C that one can do this without constraint, making all code
(including any external libs that are linked in later) use the
non-standard function?


"Hallmark of C ..." Fuzzy concept, that. Yet the Rationale
invokes the "Spirit of C," so perhaps we can dither a bit without
risk of too much castigation.

I certainly hope so! I meant it simply as "a distinguishing
characteristic or characteristics".
In my own (less than universal) experience, two obstacles to
interposing your own malloc() -- or sqrt(), or whatever -- are
fairly frequently found:

- The Standard library may be incorporated into the program
as an indivisible unit: You get the whole thing, or nothing
at all. This is/was the case on VMS in the Old Days, when
the whole schmear was implemented as one giant monolithic
shared library. VMS' linker would squawk about conflicting
symbol definitions if your home-grown malloc() had the same
name as the malloc() in the library.
Right, I recall that older C libs from Borland also had the same issue.
Point taken.
- The library itself may use unadvertised knowledge of its own
internals. (It pretty much must do so if things like atexit()
and fflush(NULL) are to work.) For example, imagine an fopen()
that for performance reasons wants to allocate an I/O buffer
on a memory page boundary. It might call a library-private
_malloc_pages() function to get such specially-aligned memory.
Fine so far: You haven't replaced _malloc_pages(), so the
library's own version is used. But what if fopen() then hands
the buffer memory to free()? It's (presumably) your free(),
not the library's free(), that gets called -- and what are
the chances that your free() and the library's free() use
identical data structures?
Ah, so if that internal symbol was linked in some other manner, it would
not see your symbol. This is, in fact, what van der Linden mentions in
his discussion of interpositioning. On his reference platform at least
(Solaris) he indicates that danger in that everything linked in later
after your redefined symbol will see it.

If I understand you correctly, this is not any sort of guarantee, and
your redefined symbol will not occlude the standard symbol in a properly
defined manner.
It's a shame, really, that C doesn't have a mechanism to allow
overriding parts of the library. Because abuses of dynamic memory
are so common, the malloc() suite is perhaps the most mouth-watering
override target, but there are others: A gets() that bleats whenever
called, or a scanf() that complains if given a "%s", even an acos()
that dumps a stack trace if its argument is larger than 1. The C
Standard, though, makes a point of separating the roles of implementor
and user -- and having lived on both sides of that fence, I for one
find the fence something of a comfort.

Indeed. I know that when we invented our C library back in the day when
such a thing was rare and expensive on the platforms we needed to
target, we invented a naming scheme of m_whatever(). It becomes clearer
to me why we did that.

Do be somewhat more on topic, I note that for a C project I worked on
recently that did a lot of memory allocation/deallocation we ended up
making a custom_malloc() that could be redefined to a debug_malloc() at
compile time. That caught a lot of potential crashes in the early
phases of the development. Once we shook the bugs out, custom_malloc()
was pointed back at malloc().
Jun 1 '06 #22

Richard Heathfield wrote:
Haider said:
Please go to the following link you will get a copy of K&R in pdf
format
That's incitement to copyright violation.

I've sent a complaint to gr**********@google.com - hopefully they can
explain to Haider about "intellectual property". Perhaps others here would
care to do the same.

it is for those peoples who don't have a copy and still don't want to
get one as far as gr**********@google.com is concern I got the link by
as the serch result of google itself. I have also sent a note to the relevant person at Prentice-Hall, advising
him of the existence of this illicit electronic copy of K&R.

Not wanting to send him duff gen, I checked the file first. It is indeed a
copy of K&R, but it is a very poor-quality copy. Learners of C would be
much better served by buying a paper copy of K&R. This is better because:

(a) you can read it with a clear conscience;
(b) you can read it independently of any electronic device - no batteries
required;
(c) you can be sure that you have the correct text;
(d) you can look things up much more quickly.

Actually, (d) surprised me. But it's true. Having a copy of K&R right there
on the desk in front of me, I find myself reaching for it when I need to
check, say, which way round args 2 and 3 to fread/fwrite go, because it's
actually less hassle than firing up a terminal, loading the Standard into a
searchable viewer of some kind, and typing in my search criteria.

If you haven't got a paper copy of K&R2, pick up the phone, get on to your
bookshop, and order one *today*.
But do read the book. --
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)


Jun 2 '06 #23
Haider wrote:
Richard Heathfield wrote:
Haider said:
Please go to the following link you will get a copy of K&R in pdf
format
That's incitement to copyright violation.

I've sent a complaint to gr**********@google.com - hopefully they can
explain to Haider about "intellectual property". Perhaps others here would
care to do the same.

it is for those peoples who don't have a copy and still don't want to
get one...


The book is available only via purchase. Free downloads on the Internet
are illegal and a copyright violation. A newbie, who may not know
better, might read your post and go ahead and download it, thus morally
and legally compromising himself.
as far as gr**********@google.com is concern I got the link by
as the serch result of google itself.


Try giving this defense in court.

Google only provides a search service for material on the Internet.
Their legality is something that the user has to be aware of.

.... snip ...
If you haven't got a paper copy of K&R2, pick up the phone, get on to your
bookshop, and order one *today*.

But do read the book.


Hahahahahaha!

Your prompting Richard Heathfield to read K&R...!?!
:)

Jun 2 '06 #24
Haider wrote:
Richard Heathfield wrote:
Haider said:
Please go to the following link you will get a copy of K&R in pdf
format That's incitement to copyright violation.

I've sent a complaint to gr**********@google.com - hopefully they can
explain to Haider about "intellectual property". Perhaps others here would
care to do the same.

it is for those peoples who don't have a copy and still don't want to
get one


You mean thieves? I'm not too fond of them myself. After all K&R put a
lot of work in to that book (including the development of the language
it describes) so they are entitled to receive payment for it.
as far as gr**********@google.com is concern I got the link by
as the serch result of google itself.


Irrelevant. You can find all sorts of illegal stuff using Google, that
does not make posting links to it acceptable.

<snip>
If you haven't got a paper copy of K&R2, pick up the phone, get on to your
bookshop, and order one *today*.

But do read the book.


Only *after* buying a copy.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
Jun 2 '06 #25

santosh wrote:
Haider wrote:
Richard Heathfield wrote:
Haider said:

> Please go to the following link you will get a copy of K&R in pdf
> format

That's incitement to copyright violation.

I've sent a complaint to gr**********@google.com - hopefully they can
explain to Haider about "intellectual property". Perhaps others here would
care to do the same.
it is for those peoples who don't have a copy and still don't want to
get one...


The book is available only via purchase. Free downloads on the Internet
are illegal and a copyright violation. A newbie, who may not know
better, might read your post and go ahead and download it, thus morally
and legally compromising himself.

but now newbie will purchase a book also till now Richard Heathfield
inform Prentice Hall
and they took steps to remove the link.
so don't worry.
as far as gr**********@google.com is concern I got the link by
as the serch result of google itself.


Try giving this defense in court.

Good. Google only provides a search service for material on the Internet.
Their legality is something that the user has to be aware of.

... snip ...
If you haven't got a paper copy of K&R2, pick up the phone, get on to your
bookshop, and order one *today*.

But do read the book.


Hahahahahaha!

Your prompting Richard Heathfield to read K&R...!?!
:)


Jun 2 '06 #26

Flash Gordon wrote:
Haider wrote:
Richard Heathfield wrote:
Haider said:

Please go to the following link you will get a copy of K&R in pdf
format
That's incitement to copyright violation.

I've sent a complaint to gr**********@google.com - hopefully they can
explain to Haider about "intellectual property". Perhaps others here would
care to do the same.

it is for those peoples who don't have a copy and still don't want to
get one


You mean thieves? I'm not too fond of them myself. After all K&R put a
lot of work in to that book (including the development of the language
it describes) so they are entitled to receive payment for it.

they deserves and they will bcoz this book is such a good one that
anyone who have a look of it will purchase a copy.
> as far as gr**********@google.com is concern I got the link by
as the serch result of google itself.


Irrelevant. You can find all sorts of illegal stuff using Google, that
does not make posting links to it acceptable.

<snip>
If you haven't got a paper copy of K&R2, pick up the phone, get on to your
bookshop, and order one *today*.

But do read the book.


Only *after* buying a copy.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc


Jun 2 '06 #27
2006-06-02 <11*********************@u72g2000cwu.googlegroups. com>, santosh wrote:
as far as gr**********@google.com is concern I got the link by
as the serch result of google itself.


Try giving this defense in court.

Google only provides a search service for material on the Internet.
Their legality is something that the user has to be aware of.


So it's legal for Google to link to it but not for a private citizen to
do so? (Not that I agree with copyright violation, but how's he supposed
to know that a search result he found isn't legitimate?)
Jun 2 '06 #28

Jordan Abel wrote:
2006-06-02 <11*********************@u72g2000cwu.googlegroups. com>, santosh wrote:
as far as gr**********@google.com is concern I got the link by
as the serch result of google itself.


Try giving this defense in court.

Google only provides a search service for material on the Internet.
Their legality is something that the user has to be aware of.


So it's legal for Google to link to it but not for a private citizen to
do so? (Not that I agree with copyright violation, but how's he supposed
to know that a search result he found isn't legitimate?)


[1] It is difficult (if not impossible) to build such discretion in a
system.
It is however perfectly acceptable to ask for such a quality among
human beings.

[2] Google is not soliciting that you try that out. The poster in
question did.
That's illegal, if I'm not mistaken, from a legal perspective.

Jun 2 '06 #29
Jordan Abel wrote:
2006-06-02 <11*********************@u72g2000cwu.googlegroups. com>, santosh wrote:
as far as gr**********@google.com is concern I got the link by
as the serch result of google itself.


Try giving this defense in court.

Google only provides a search service for material on the Internet.
Their legality is something that the user has to be aware of.


So it's legal for Google to link to it but not for a private citizen to
do so? (Not that I agree with copyright violation, but how's he supposed
to know that a search result he found isn't legitimate?)


Google uses automated methods to build their indexes. Their staff
cannot review each and every webpage their web crawlers traverse.

Usually, when authors want to protect their IP, they provide some sort
of copyright notice or license etc. If this is available, people are
expected to read and follow it. Now granted tons of legal and illegal
stuff on the Internet is accompanied by no terms of use. A newbie might
not even know that the said material is illegal. That's why Richard
Heathfield posted a follow-up to Haider's unwanted link.

Ultimately, people have one or two little things called intelligence,
common sense and conscience, which they are expected to exercise.
Companies and web-bots have none of the above. Err...atleast not the
third faculty.

Jun 2 '06 #30
Haider wrote:
Flash Gordon wrote:
Haider wrote:
Richard Heathfield wrote:
> Haider said:
>
>> Please go to the following link you will get a copy of K&R in pdf
>> format
> That's incitement to copyright violation.
>
> I've sent a complaint to gr**********@google.com - hopefully they can
> explain to Haider about "intellectual property". Perhaps others here would
> care to do the same.
>
it is for those peoples who don't have a copy and still don't want to
get one


You mean thieves? I'm not too fond of them myself. After all K&R put a
lot of work in to that book (including the development of the language
it describes) so they are entitled to receive payment for it.

they deserves and they will bcoz this book is such a good one that
anyone who have a look of it will purchase a copy.


That's not garunteed and is beside the point, i.e., that your link is
still an encouragement of copyright violation.

Jun 2 '06 #31
santosh said:
Haider wrote:
>

But do read the book.


Hahahahahaha!

Your prompting Richard Heathfield to read K&R...!?!
:)


Well, yes, it's true that I don't need prompting.

K&R2 is always to hand here, and consulted regularly.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jun 2 '06 #32
Jordan Abel <ra****@random.yi.org> writes:
2006-06-02 <11*********************@u72g2000cwu.googlegroups. com>,
santosh wrote:
as far as gr**********@google.com is concern I got the link by
as the serch result of google itself.


Try giving this defense in court.

Google only provides a search service for material on the Internet.
Their legality is something that the user has to be aware of.


So it's legal for Google to link to it but not for a private citizen to
do so? (Not that I agree with copyright violation, but how's he supposed
to know that a search result he found isn't legitimate?)


I have no idea whether posting a link to an illegal copy of a
copyrighted work is illegal in whatever jurisdiction the poster
happens to live in. I suggest that speculating about whether posting
a link is legal or not is a waste of time. Anyone who feels the need
to discuss it can go to misc.int-property.

The point, I think, is that posting a link to an illegal copy of K&R
is *rude*. Kernighan and Ritchie deserve to be paid for their
considerable efforts. Don't encourage theft of their intellectual
property.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jun 2 '06 #33
2006-06-02 <ln************@nuthaus.mib.org>, Keith Thompson wrote:
Jordan Abel <ra****@random.yi.org> writes:
2006-06-02 <11*********************@u72g2000cwu.googlegroups. com>,
santosh wrote:
as far as gr**********@google.com is concern I got the link by
as the serch result of google itself.

Try giving this defense in court.

Google only provides a search service for material on the Internet.
Their legality is something that the user has to be aware of.


So it's legal for Google to link to it but not for a private citizen to
do so? (Not that I agree with copyright violation, but how's he supposed
to know that a search result he found isn't legitimate?)


I have no idea whether posting a link to an illegal copy of a
copyrighted work is illegal in whatever jurisdiction the poster
happens to live in. I suggest that speculating about whether posting
a link is legal or not is a waste of time. Anyone who feels the need
to discuss it can go to misc.int-property.

The point, I think, is that posting a link to an illegal copy of K&R
is *rude*. Kernighan and Ritchie deserve to be paid for their
considerable efforts. Don't encourage theft of their intellectual
property.


The other problem is that he _himself_ might not have known it wasn't
legal - there's lots of material online under open licenses (GPL, GFDL,
CC) or otherwise free to copy (like WG14's stuff). While it certainly
deserves pointing out (and the site that has it up should be reported to
the publisher - and if it weren't in russia, the hosting ISP), the
response seemed a bit rude also.
Jun 2 '06 #34
On 2 Jun 2006 22:19:16 GMT, Jordan Abel <ra****@random.yi.org> wrote:
The other problem is that he _himself_ might not have known it wasn't
legal - there's lots of material online under open licenses (GPL, GFDL,
CC) or otherwise free to copy (like WG14's stuff).


Such material is always, in my experience, clearly designated as such.
OTOH, the appearance of a book image, complete with cover, but missing
the copyright page, is a pretty good clue that something's not kosher.

Since most publications are copyrighted by default, one must assume
they are not available without permission, in the absence of a notice
to the contrary.

--
Al Balmer
Sun City, AZ
Jun 2 '06 #35
Keith Thompson <ks***@mib.org> writes:
The point, I think, is that posting a link to an illegal copy of K&R
is *rude*. Kernighan and Ritchie deserve to be paid for their
considerable efforts.
Interesting point. The copyright date in K&R2 is 1988. Given
the original 14-year span of copyright in the United States, the
copyright on K&R2 would have expired in 2002. One would think
that K&R made some money on it in those years.

Of course, these days, copyrights never expire in an author's
lifetime.
Don't encourage theft of their intellectual property.


Funny how the definition of "theft" expands as time goes on.
--
"Given that computing power increases exponentially with time,
algorithms with exponential or better O-notations
are actually linear with a large constant."
--Mike Lee
Jun 2 '06 #36
2006-06-02 <87************@benpfaff.org>, Ben Pfaff wrote:
Keith Thompson <ks***@mib.org> writes:
The point, I think, is that posting a link to an illegal copy of K&R
is *rude*. Kernighan and Ritchie deserve to be paid for their
considerable efforts.
Interesting point. The copyright date in K&R2 is 1988. Given
the original 14-year span of copyright in the United States,


The original span was 28 years. Two 14-year periods. That would put its
expiration at 2016, if they bothered to renew it in 2002.
the copyright on K&R2 would have expired in 2002. One would think
that K&R made some money on it in those years.

Of course, these days, copyrights never expire in an author's
lifetime.
Don't encourage theft of their intellectual property.


Funny how the definition of "theft" expands as time goes on.

Jun 3 '06 #37

"Jordan Abel" <ra****@random.yi.org> wrote in message
news:slrne81va7.1hph.ra****@random.yi.org...
2006-06-02 <87************@benpfaff.org>, Ben Pfaff wrote:
Keith Thompson <ks***@mib.org> writes:
The point, I think, is that posting a link to an illegal copy of K&R
is *rude*. Kernighan and Ritchie deserve to be paid for their
considerable efforts.


Interesting point. The copyright date in K&R2 is 1988. Given
the original 14-year span of copyright in the United States,


The original span was 28 years. Two 14-year periods. That would put its
expiration at 2016, if they bothered to renew it in 2002.

------------> According to a handy Almanac, works created after
Jan 1, 1978 (obviously K&R!) are protected for seventy years
after the last joint author dies.
As I remember, until the 70's the copyright was for 28 yrs, renewable
once - but I do remember seeing something that many yrs ago it was
14 years.
W H G
--------------------------------------------------------

Jun 3 '06 #38
2006-06-03 <RC*******************@newssvr27.news.prodigy.net> , W H G wrote:

"Jordan Abel" <ra****@random.yi.org> wrote in message
news:slrne81va7.1hph.ra****@random.yi.org...
2006-06-02 <87************@benpfaff.org>, Ben Pfaff wrote:
Keith Thompson <ks***@mib.org> writes:

The point, I think, is that posting a link to an illegal copy of K&R
is *rude*. Kernighan and Ritchie deserve to be paid for their
considerable efforts.

Interesting point. The copyright date in K&R2 is 1988. Given
the original 14-year span of copyright in the United States,


The original span was 28 years. Two 14-year periods. That would put its
expiration at 2016, if they bothered to renew it in 2002.

------------> According to a handy Almanac, works created after
Jan 1, 1978 (obviously K&R!) are protected for seventy years
after the last joint author dies.
As I remember, until the 70's the copyright was for 28 yrs, renewable
once - but I do remember seeing something that many yrs ago it was
14 years.


Yes, but at that time it was also renewable [for a total of 28].
Jun 3 '06 #39
Michael Mair wrote:

Peter Nilsson schrieb:
Karsten Jung wrote:
Hello together,


Who is 'together'?


Consider it a quirk of word-by-word translation; the OP
probably meant "Hello everybody"/"Hi all".

<snip>


The lack of a plural "you",
is a defficiency of the modern English language.

http://dictionary.reference.com/search?q=y%27all&db=*

The single most famous feature of Southern United States dialects
is the pronoun y'all, sometimes heard in its variant you-all.

In addition to y'all, other forms for plural you include you-uns,
youse, and you guys or youse guys.
Youse is common in vernacular varieties in the Northeast,
particularly in large cities such as New York and Boston,
and is also common in Irish English.
You-uns is found in western Pennsylvania and in the
Appalachians and probably reflects the Scotch-Irish roots of many
European settlers to these regions.

--
pete
Jun 3 '06 #40
pete wrote:
.... snip ...
The lack of a plural "you",
is a defficiency of the modern English language.


Dost thou not realize that 'you' is plural? :-)

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html
Jun 3 '06 #41
Jordan Abel said:
2006-06-03 <RC*******************@newssvr27.news.prodigy.net> , W H G
wrote:

------------> According to a handy Almanac, works created after
Jan 1, 1978 (obviously K&R!) are protected for seventy years
after the last joint author dies.
As I remember, until the 70's the copyright was for 28 yrs, renewable
once - but I do remember seeing something that many yrs ago it was
14 years.


Yes, but at that time it was also renewable [for a total of 28].


It is widely known that "The C Programming Language" expires in January
2038. :-)

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jun 3 '06 #42
In article <44***********@mindspring.com>,
pete <pf*****@mindspring.com> wrote:
The lack of a plural "you",
is a defficiency of the modern English language.


No, it's the lack of a singular.

-- Richard
Jun 3 '06 #43
In article <87************@benpfaff.org> bl*@cs.stanford.edu writes:
Keith Thompson <ks***@mib.org> writes:
The point, I think, is that posting a link to an illegal copy of K&R
is *rude*. Kernighan and Ritchie deserve to be paid for their
considerable efforts.
Interesting point. The copyright date in K&R2 is 1988. Given
the original 14-year span of copyright in the United States, the
copyright on K&R2 would have expired in 2002.


Interesting point. The US entered the Berne convention on 1 March 1989.
Given that for the Berne convention the actual date of publication is
the starting point, I wonder whether K&R2 already did fall under it.
(At that time the Berne convention stated that a copyright is retained
until 50 years after the death of the original authors. Since that
time that has been increased to 70 years.) So the remaining questions are
1. Was it published before 1 March 1989?
2. Did the United States ratify the Berne convention only for works
published after 1 March 1989 (I think not)?
(Note: for the Berne convention the copyright notice is irrelevant, and
can be omitted. However, for works published in the US, it remains
relevant in order to be able to be awarded damages, according to US law.)
One would think
that K&R made some money on it in those years.


So you think that if somebody has made some money with his work that at
some point it is enough?
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
Jun 3 '06 #44
"Dik T. Winter" <Di********@cwi.nl> writes:
In article <87************@benpfaff.org> bl*@cs.stanford.edu writes:
> One would think that K&R made some money on it in those
> years.


So you think that if somebody has made some money with his work that at
some point it is enough?


In the United States, the Constitution requires that copyright be
for a limited time, so this is axiomatically true here.
--
Ben Pfaff
email: bl*@cs.stanford.edu
web: http://benpfaff.org
Jun 3 '06 #45
2006-06-03 <J0********@cwi.nl>,
Dik T. Winter wrote:
So you think that if somebody has made some money with his work that at
some point it is enough?


That's the constitutional basis for copyright, yeah. At what point do
longer copyright terms gain less in incentive to produce more works than
they cost in discouragement of production of derived works?
Jun 4 '06 #46
On Sat, 03 Jun 2006 16:25:26 -0400, CBFalconer wrote:
pete wrote:

... snip ...

The lack of a plural "you",
is a defficiency of the modern English language.


Dost thou not realize that 'you' is plural? :-)


Actually, the plural form is "youse." ;-)

See http://www.bartleby.com/61/91/Y0029150.html
~Dave~
Jun 4 '06 #47
In article <sl********************@random.yi.org> ra*******@gmail.com writes:
2006-06-03 <J0********@cwi.nl>,
Dik T. Winter wrote:
So you think that if somebody has made some money with his work that at
some point it is enough?


That's the constitutional basis for copyright, yeah. At what point do
longer copyright terms gain less in incentive to produce more works than
they cost in discouragement of production of derived works?


In the Berne convention that is not the basis for copyright. And even
after the copyright has expired it may be possible in many countries that
it is not allowed to produce a derived work (although reproduction of the
original work is now free), even not by the original copyright holder if
that is not the original creator. This is known in German as "Urheberrecht",
and applies particularly to works of science and art. But what *are*
derived works of things that fall under "copyright"? A pastiche of a
well known work is certainly a derived work and also permitted under the
copyright law. There are quite a few of such available, derived from the
Harry Potter books.
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
Jun 5 '06 #48
Ben Pfaff <bl*@cs.stanford.edu> wrote:
"Dik T. Winter" <Di********@cwi.nl> writes:
In article <87************@benpfaff.org> bl*@cs.stanford.edu writes:
> One would think that K&R made some money on it in those
> years.


So you think that if somebody has made some money with his work that at
some point it is enough?


In the United States, the Constitution requires that copyright be
for a limited time, so this is axiomatically true here.


In the United States, Dizney 0wnz0rs teh C0nstitooti0n.

Richard
Jun 6 '06 #49
Dave <da**@comteck.com> wrote:
On Sat, 03 Jun 2006 16:25:26 -0400, CBFalconer wrote:
pete wrote:
The lack of a plural "you",
is a defficiency of the modern English language.


Dost thou not realize that 'you' is plural? :-)


Actually, the plural form is "youse." ;-)

See http://www.bartleby.com/61/91/Y0029150.html


Pah. I don't care what a colonial dictionary says, Chuck is correct. Not
that having two identical pronouns is unique to English; Dutch has "zij"
and "zij", and German "sie" and "Sie".

Richard
Jun 7 '06 #50

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Aire | last post by:
On some small-memory systems, is it true that "malloc()" is not supported by the C library? Why is 'dynamic memory allocation' so avoided on such systems? What are major problems of using...
42
by: Joris Adriaenssens | last post by:
This is my first posting, please excuse me if it is off-topic. I'm learning to program in C. It's been almost ten years I've been programming and a lot of things have changed apparently. I...
36
by: Martin Andert | last post by:
Hello, I have a question regarding malloc and free. Here my code sample: int main() { /* allocating dynamic memory for array */ int* array = (int*) malloc(5 * sizeof(int)); /* ... program...
12
by: gooch | last post by:
I originally posted the following code in a group discussing threads but after further research I think I have a c question about the code. I know there are a couple of non standard c includes here...
21
by: ramu | last post by:
Hi, Will the memory allocated by malloc and realloc be contiguous? regards
82
by: quiberon2 | last post by:
Hi, Sorry if it might be a stupid question but what should returns malloc(0) ? void *ptr = malloc(0); I am running gcc 3.3.5 and a non-null address is returned. ( in the compiler that I am...
6
by: sam_cit | last post by:
Hi Everyone, I wanted to know as to how malloc() works, if my understanding is correct, it is implementation specific of the vendor who provides the library(alloc.h). If so, is there any...
71
by: desktop | last post by:
I have read in Bjarne Stroustrup that using malloc and free should be avoided in C++ because they deal with uninitialized memory and one should instead use new and delete. But why is that a...
10
by: somenath | last post by:
Hi All, I have one question regarding return value cast of malloc. I learned that we should not cast the return value of malloc because it is bug hider. But my question is as mentioned...
8
by: ramsatishv | last post by:
Hi Group, I have one question. If I am allocating memory of 38 bytes to an integer pointer, what will be the memory actually allocated? Will there be any memory alignment concept in malloc?...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.