473,762 Members | 5,649 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 23184
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.annou nce.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************ *******@newssvr 27.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*****@mindsp ring.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.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.


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 "Urheberrec ht",
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.stanfor d.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.c om> 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
8573
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
2179
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
2282
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
3282
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
31145
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
19121
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
1910
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
7266
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
9554
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9378
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
10137
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
9989
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...
1
9927
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9812
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...
1
7360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
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();...
1
3914
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.