Re: Equivalent malloc with calloc



"B. Augestad" <boa@xxxxxxxxxxxxxx> writes:
Richard Tobin wrote:
In article <pan.2007.04.03.12.56.46@xxxxxxxxxxxxxx>,
J. Sommers <jsommers@xxxxxxxxxxxxxx> wrote:

Prime Computers is dead isn't it?
How could you tell?
-- Richard

Wikipedia? According to http://en.wikipedia.org/wiki/Prime_Computer,
Prime Computers died 15 years ago.

Are there still computers made by Prime running somewhere? Hard to
tell, but that's not really important. If Prime is/was the only
example of computers with NULL != all bits zero, we either need more
examples or it is safe to assume that one can use calloc() to zero out
pointers.

Since the standard makes no such guarantee, a new platform could come
out tomorrow with null pointers having some representation other than
all-bits-zero. Those of us who have avoided making any assumptions
about pointer representation will be able to port our code to the new
platform with no problem (at least not in that area).

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <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."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.



Relevant Pages

  • Re: working with addresses
    ... >> But computers cannot use nanobits. ... I'm sorry if I got it wrong, maybe it's not a very good analogy :-( ... > represent byte pointers, and lot numbers to represent house pointers. ... perhaps people will stop thinking of you as a foolish troll. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: ANN: pldev.org
    ... It reduces some of the functionality of pointers. ... ANSI C has void pointers to prevent dereferencing null values. ... Char pointers point to a type and therefore allow ... "Computers that were able to deal just with numbers evolved into computers ...
    (comp.lang.misc)
  • Looking for an imaginary? tool
    ... I am a researcher and a programmer who have worked with computers ever since the middle sixties. ... Some are completely useless, a large number are uninteresting (e.g. there are a large number of files in a Delphi project, what you want to keep track of is the .dpr files, the other files follows, you are not interested in everything), and some are relevant to something or other. ... I have some vague ideas what I am looking for, a kind of master "File Explorer" which would collect a data base of pointers to files on a disk and maintain a list of the names of the projects together with comments on the contents and their purpose. ...
    (borland.public.delphi.non-technical)
  • Re: Neatest way to get the end pointer?
    ... I also like to modify function parameters ... because a lot of parameters tend to be pointers. ... Stepping through an array with i would involve creating an unnecessary temporary, and probably a bit of useless arithmetic to dereference, whilst if you just incremented the pointer the generated machine code would be tighter. ... However computers are faster now and optimisers more aggressive. ...
    (comp.lang.c)
  • How I got interested in the Apple ][...
    ... my first exposure to personal computers (a.k.a. ... The school division that my little rural school was ... the Apple //e computers were what got me completely ... obsession with the A2 platform. ...
    (comp.sys.apple2)