473,770 Members | 2,519 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
49 23192
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**********@go ogle.com - hopefully they can
> explain to Haider about "intellectu al 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************ *********@u72g2 000cwu.googlegr oups.com>,
santosh wrote:
as far as gr**********@go ogle.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_Keit h) 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.or g>, Keith Thompson wrote:
Jordan Abel <ra****@random. yi.org> writes:
2006-06-02 <11************ *********@u72g2 000cwu.googlegr oups.com>,
santosh wrote:
as far as gr**********@go ogle.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.or g> 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.or g> 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****@ra ndom.yi.org...
2006-06-02 <87************ @benpfaff.org>, Ben Pfaff wrote:
Keith Thompson <ks***@mib.or g> 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************ *******@newssvr 27.news.prodigy .net>, W H G wrote:

"Jordan Abel" <ra****@random. yi.org> wrote in message
news:slrne81va7 .1hph.ra****@ra ndom.yi.org...
2006-06-02 <87************ @benpfaff.org>, Ben Pfaff wrote:
Keith Thompson <ks***@mib.or g> 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

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

Similar topics

11
8575
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 malloc() here? Thanks!
42
2180
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 understand from other postings that casting a result from malloc isn't good. In the past I have always been casting the malloc. I think it was even necessary. (But that's a long time ago, I hadn't heard of a standard for C these days). Was it...
36
2285
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 code ... */
12
3284
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 and the POSIX stuff is non standard but this is how I stumbled onto this question. #include <INTEGRITY.h> #include <stdlib.h> #include <stdio.h> #include <pthread.h> #include <signal.h>
21
470
by: ramu | last post by:
Hi, Will the memory allocated by malloc and realloc be contiguous? regards
82
31154
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 currently implementing, NULL is returned. Is it wrong ?)
6
5495
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 standard as to how it should be implemented? If there is no space in the RAM, will malloc() return NULL or will it allocate a memory in a new page using virtual memory and return the
71
19131
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 problem? I cannot see why using malloc instead of new does not give the same result.
10
1911
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 bellow . Lets say I have not included stdlib.h in my program still I am using malloc so compiler will throw warring because with out prototype
8
7267
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? Please let me know the reasons if it is yes / no.
0
9425
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10230
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10058
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8886
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.