473,396 Members | 2,106 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.

What is the use of static function in C?

Hi friend,
i have a problem in my program what is the use of static function in C
lang?
plz help me

Nov 15 '05 #1
40 3175
vishnu wrote:
i have a problem in my program what is the use of static function in C
lang?


Your question is not clear.
What is your problem? "what is the use of static function in C lang?"
seems not to fit the description "problem in [your] program".

If you mean
static int foo (void);
in contrast to
int foo (void);
or
extern int foo (void);
then look up "linkage" in your C textbook.
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Nov 15 '05 #2

"vishnu" <nv********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hi friend,
i have a problem in my program
Please describe the problem (ideally with example code
and specific questions).
what is the use of static function in C
lang?


Let's fix your problem first.

-Mike
Nov 15 '05 #3


hi friend,

what is function pointer how it is useful?
plz help me.
hi friend,

what is function pointer how it is useful?
plz help me.

These all look like the same person to me.. I could be wrong, but is someone having wanting answer to their homework problems?
vishnu wrote:
Hi friend,
i have a problem in my program what is the use of static function in C
lang?
plz help me

Nov 15 '05 #4

"vishnu" <nv********@gmail.com> wrote
Hi friend,
i have a problem in my program what is the use of static function in C
lang?
plz help me

They are hugely useful.

Let's say I want to load a jpeg file. Bascially, all my calling programmer,
Sheila, wants to do is pass in a filename, and get the bits back. She's a 3d
programmer rather than a signals processing type person, and neither knows
nor cares anything about the JPEG format.

So she wants to call

unsigned char *loadjpeg(char *filename, int *width, int *height)

However JPEG files are very complicated - trying to pack the whole loader
into a single function would make the code totally unreadable. There are
also natural units we want to do - for instance the 8-point inverse cosine
transform has got to be called 16 times for each block.

Now let's say I write a function

idct8(float *values)

The problem is that if I make this public, someone might call it. When I go
back to my jpeg loader, i might wnat to make things more efficient. For
instance I might want to alter the function so that it doesn't use floating
point.
The other problem is that Fred, who is doing audio, might also need a idct8
function. In his case the 8 means that it is dealing with 8-bit samples.
So by just declaring the loadjpeg function with external linkage, and making
everything else static, I protect my code, don't pollute namespace, and make
it clear to Sheila that I am contracting to load a jpeg and return the bits,
but I don't provide any math routines or anything else.

Nov 15 '05 #5

Malcolm wrote:
The other problem is that Fred, who is doing audio, might also need a idct8
function. In his case the 8 means that it is dealing with 8-bit samples.
So by just declaring the loadjpeg function with external linkage, and making
everything else static, I protect my code, don't pollute namespace, and make
it clear to Sheila that I am contracting to load a jpeg and return the bits,
but I don't provide any math routines or anything else.


Another benefit of static is to give additional freedom to compiler to
do optimizations. The compiler knows the function is local to this
translation
unit and can do things like inlining. I remember reading someone
commenting
that it would have been far better for functions to default to static
rather than
global (external linkage). But I guess its too late to change that now
and it is always
better to write new functions as static if possible.

Karthik

Nov 15 '05 #6

<ka*****@gmail.com> wrote
The other problem is that Fred, who is doing audio, might also need a
idct8
function. In his case the 8 means that it is dealing with 8-bit samples.
So by just declaring the loadjpeg function with external linkage, and
making
everything else static, I protect my code, don't pollute namespace, and
make
it clear to Sheila that I am contracting to load a jpeg and return the
bits,
but I don't provide any math routines or anything else.


Another benefit of static is to give additional freedom to compiler to
do optimizations. The compiler knows the function is local to this
translation unit and can do things like inlining. I remember reading
someone
commenting that it would have been far better for functions to default to
static
rather than global (external linkage). But I guess its too late to change
that now
and it is always better to write new functions as static if possible.

That is probably a good snapshot of current compiler practise, but
technology changes.
There is no reason a compiler running on a modern PC cannot load the whole
of a largeish program into memory in C source form, and do a full compile,
within a few seconds. In the days when 66Mhz was leading edge, of course you
needed the object file / linker workaround to make compile times acceptable.
(It was the same story with "register". Nowadays it is unusual for the
programmer to be able to make better decisions than the compiler.)

The other point is that runtime efficiency isn't as important as it was.
Most computers nowadays are fast enough, and a good program is one that does
what it says and is easy to use, not one that responds quickly.

Having said that, I have just entered the brave world of Beowulf cluster
massively (well, 40 nodes) parallel supercomputing, and I am resorting to
Fortran to speed things up a bit.
Nov 15 '05 #7
Malcolm wrote:
<ka*****@gmail.com> wrote
The other problem is that Fred, who is doing audio, might also need a
idct8
function. In his case the 8 means that it is dealing with 8-bit samples.
So by just declaring the loadjpeg function with external linkage, and
making
everything else static, I protect my code, don't pollute namespace, and
make
it clear to Sheila that I am contracting to load a jpeg and return the
bits,
but I don't provide any math routines or anything else. Another benefit of static is to give additional freedom to compiler to
do optimizations. The compiler knows the function is local to this
translation unit and can do things like inlining. I remember reading
someone
commenting that it would have been far better for functions to default to
static
rather than global (external linkage). But I guess its too late to change
that now
and it is always better to write new functions as static if possible.

That is probably a good snapshot of current compiler practise, but
technology changes.


The reason it is best to write functions as static if possible is not
only because of the compiler, it is also because of the human reader. If
a function is static them you know it is only used locally (unless its
address is taken) which limits how much you have to look at when trying
to fix a bug in it. Otherwise you have to check where else it might be
called from just in case something relies on the behaviour you are about
to change.
There is no reason a compiler running on a modern PC cannot load the whole
of a largeish program into memory in C source form, and do a full compile,
within a few seconds.
That depends on how large the source base is. Loading the source base of
openoffice in to memory and compiling it will take more than a few
seconds on a modern PC.
In the days when 66Mhz was leading edge, of course you
needed the object file / linker workaround to make compile times acceptable.
If you think that is no longer required now you don't work on large
projects. Try looking up the build time fir a Gentoo Linux system where
everything is built from source.
(It was the same story with "register". Nowadays it is unusual for the
programmer to be able to make better decisions than the compiler.)
That is true.
The other point is that runtime efficiency isn't as important as it was.
That is the attitude that forces people to upgrade hardware. It is also
not true in embedded systems where you might have a limit to the
processing power you can use because of a limit on the amount of heat
you are allowed to dissipate (this applies to at least some avionics
systems).
Most computers nowadays are fast enough, and a good program is one that does
what it says and is easy to use, not one that responds quickly.
A good program is one that does what is required correctly within an
acceptable amount of time and cost an acceptable amount to develop.
These are competing requirements but some things, such as not making the
optimisers job harder than necessary (e.g. declaring functions as
static when they are not called directly from outside the translation
unit) cost very little or nothing but can help meet the performance
requirements.
Having said that, I have just entered the brave world of Beowulf cluster
massively (well, 40 nodes) parallel supercomputing, and I am resorting to
Fortran to speed things up a bit.


Performance will probably always be an issue because people will always
want the software to do more. So you should always make it easy for the
optimiser and maintainer by them the information you have, such as that
a function is only called from within the one translation unit.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Nov 15 '05 #8

"Flash Gordon" <sp**@flash-gordon.me.uk> wrote
That is probably a good snapshot of current compiler practise, but
technology changes.
The reason it is best to write functions as static if possible is not only
because of the compiler, it is also because of the human reader. If a
function is static them you know it is only used locally (unless its
address is taken) which limits how much you have to look at when trying to
fix a bug in it. Otherwise you have to check where else it might be called
from just in case something relies on the behaviour you are about to
change.

That's the real answer. Usually the priority is to have clean,
understandable code. Speed of execution / memory usage / compiling problems
are almost always secondary, except in the inner loops of time-critical
programs.
That depends on how large the source base is. Loading the source base of
openoffice in to memory and compiling it will take more than a few seconds
on a modern PC.
I got a new PC a few weeks ago, and it has 2 GB of memory installed.
1MB of ASCII represents about 100,000 words of English, or an average novel.
That's probably a good year's work for a programmer.
So 2 Gigabytes holds 2000 programmer year's work. That's a large project,
way beyond the resources of all but the largest companies.

If you think that is no longer required now you don't work on large
projects. Try looking up the build time fir a Gentoo Linux system where
everything is built from source.
The reason is that the compiler is designed to treat core as a limited
resource. So it loads each file individually, outputs an object file, then
loads all the object files back in to link them.

There's no reason for a modern compiler to work like that - it can hold all
the source in core for all bu the largest projects. True, you cannot compile
a project with over 2GB of source on an average PC, but given that the 2000
programmer years will cost over a hundred million dollars, a nice
supercomputer hosting a cross compiler won't break the budget.
Performance will probably always be an issue because people will always
want the software to do more. So you should always make it easy for the ^^^^^ optimiser and maintainer by them the information you have, such as that a
function is only called from within the one translation unit.

Usually you are right - there's no point throwing cycles away. However you
cannot declare static functions in Fortran 77, which is the native language
of the Beowulf cluster. So to make all code follow the same conventions is
maybe a good idea - just maybe.
Nov 15 '05 #9

vishnu schrieb:
Hi friend,
i have a problem in my program what is the use of static function in C
lang?
plz help me


You must avoid using static functions at all costs if there are dynamic
functions available! Use dynamic functions whenever possible.

Nov 16 '05 #10
qu*********@consultant.com wrote:

vishnu schrieb:
Hi friend,
i have a problem in my program what is the use of
static function in C lang?
plz help me


You must avoid using static functions
at all costs if there are dynamic
functions available! Use dynamic functions whenever possible.


static functions are a feature of standard C.
"dynamic functions" means nothing in the context of standard C.

--
pete
Nov 16 '05 #11
In article <dl**********@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com>, Malcolm
<re*******@btinternet.com> writes
The other point is that runtime efficiency isn't as important as it was.
Absolutely un-true!
Most computers nowadays are fast enough, and a good program is one that does
what it says and is easy to use, not one that responds quickly.


Most computers on the planet are 8 bit micros with 256 RAM and 64K code
space..... At one time there were 3 or 4 in every PC.

In embedded systems (ie vitally *ANYTHING* that has electrical power
these days) still work on the smaller the memory the better. The cost of
adding a 1 dollar memory chip on to a system can cost 2000 USD in
engineering time and 100,000 USD a year to a project producing 50K units

In a car if you added an additional memory chip to each of the 100 MCU
in the system you will be adding 20,000 USD to the NRE of the car. Then
the productions costs would go up by 200 USD per car...

(all figures for illustration only and are approximate based on 20 years
experience)
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Nov 16 '05 #12

pete schrieb:
qu*********@consultant.com wrote:

vishnu schrieb:
Hi friend,
i have a problem in my program what is the use of
static function in C lang?
plz help me


You must avoid using static functions
at all costs if there are dynamic
functions available! Use dynamic functions whenever possible.


static functions are a feature of standard C.
"dynamic functions" means nothing in the context of standard C.


Did I say it meant anything?

Nov 16 '05 #13
On 2005-11-16 12:19:20 -0500, qu*********@consultant.com said:

pete schrieb:
qu*********@consultant.com wrote:

vishnu schrieb:

Hi friend,
i have a problem in my program what is the use of
static function in C lang?
plz help me

You must avoid using static functions
at all costs if there are dynamic
functions available! Use dynamic functions whenever possible.


static functions are a feature of standard C.
"dynamic functions" means nothing in the context of standard C.


Did I say it meant anything?


Well, by using it, you certainly implied that it meant something.
Unless, that is, you're in the habit of using meaningless terms.

Perhaps you should clarify what it is yea meant when you said "dynamic
functions".

--
Clark S. Cox, III
cl*******@gmail.com

Nov 16 '05 #14
pete <pf*****@mindspring.com> writes:
qu*********@consultant.com wrote:
vishnu schrieb:
> Hi friend,
> i have a problem in my program what is the use of
> static function in C lang?
> plz help me


You must avoid using static functions
at all costs if there are dynamic
functions available! Use dynamic functions whenever possible.


static functions are a feature of standard C.
"dynamic functions" means nothing in the context of standard C.


I think quetzalcotl was trying to provide an appropriate level of help
to someone asking about a homework problem.

--
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.
Nov 16 '05 #15
qu*********@consultant.com a écrit :
Did I say it meant anything?


** Troll Alert ***

--
A+

Emmanuel Delahaye
Nov 16 '05 #16
On Wed, 16 Nov 2005 14:22:43 +0000, in comp.lang.c , Chris Hills
<ch***@phaedsys.org> wrote:
In article <dl**********@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com>, Malcolm
<re*******@btinternet.com> writes

The other point is that runtime efficiency isn't as important as it was.


Absolutely un-true!


Even setting aside the microcontroller aspect, this is dangerous, and
I sincerely hope that CS schools don't teach it.

I have a serious problem at work with programmers assuming unlimited
resources - about 2% of our overnight processing now consumes more
than 4GB of memory. If you've ever tried sourcing 16GB of memory for a
new Sun server, you'll know that this is an expensive mistake...

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 17 '05 #17

Clark S. Cox III schrieb:
On 2005-11-16 12:19:20 -0500, qu*********@consultant.com said:

pete schrieb:
qu*********@consultant.com wrote:

vishnu schrieb:

> Hi friend,
> i have a problem in my program what is the use of
> static function in C lang?
> plz help me

You must avoid using static functions
at all costs if there are dynamic
functions available! Use dynamic functions whenever possible.

static functions are a feature of standard C.
"dynamic functions" means nothing in the context of standard C.


Did I say it meant anything?


Well, by using it, you certainly implied that it meant something.
Unless, that is, you're in the habit of using meaningless terms.


I'm in the habit of giving appropriate answers to stupid questions. It
is obvious to me that the OP knows near to nothing about functions in C
or about the effect of the keyword static. In other words, he knows
almost nothing. If he knew about those topics, he could easily infer
what the difference between

int f() { .. }

and

static int f() { ... }

is. It would be another case, if he asked like so: "I know, that static
items (not just functions) cannot be seen from other compilation units.
I just can't imagine how this is useful. Please enlighten me."

Another, albeit less irritating appropriate answer could have been:
"Well, in

static int f(int a, int b) { return a+b; }

I define a static function that computes the sum of two integers, a and
b. This static function can then be used only for that purpose. If, for
example, you want to use a static function to add two doubles, x and y,
you cannot use f. Fortunately, it is possible in most cases to define
another static function that does just what you want to use it for."

Nov 17 '05 #18
In article <11*********************@o13g2000cwo.googlegroups. com>,
qu*********@consultant.com writes

Clark S. Cox III schrieb:
On 2005-11-16 12:19:20 -0500, qu*********@consultant.com said:
>
> pete schrieb:
>
>> qu*********@consultant.com wrote:
>>>
>>> vishnu schrieb:
>>>
>>>> Hi friend,
>>>> i have a problem in my program what is the use of
>>>> static function in C lang?
>>>> plz help me
>>>
>>> You must avoid using static functions
>>> at all costs if there are dynamic
>>> functions available! Use dynamic functions whenever possible.
>>
>> static functions are a feature of standard C.
>> "dynamic functions" means nothing in the context of standard C.
>
> Did I say it meant anything?


Well, by using it, you certainly implied that it meant something.
Unless, that is, you're in the habit of using meaningless terms.


I'm in the habit of giving appropriate answers to stupid questions. It
is obvious to me that the OP knows near to nothing about functions in C
or about the effect of the keyword static. In other words, he knows
almost nothing. If he knew about those topics,

If he knew he would not be asking. static functions and static variables
are often confused by students and new programmers (and many old ones
too :-)

I have noticed that there is a far more vindictive streak in this NG
these days compared to when I started reading it 15 off years ago.

Whilst no one wants to do home work for some one you can always point
them in the right direction of study.

When people come here to ask "the experts" they don't expect them to
behave like self righteous pompous twats.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Nov 17 '05 #19

Chris Hills wrote:
In article <11*********************@o13g2000cwo.googlegroups. com>,
>>> vishnu schrieb:
>>>
>>>> Hi friend,
>>>> i have a problem in my program what is the use of
>>>> static function in C lang?
>>>> plz help me
>>>

I have noticed that there is a far more vindictive streak in this NG
these days compared to when I started reading it 15 off years ago.

Whilst no one wants to do home work for some one you can always point
them in the right direction of study.

When people come here to ask "the experts" they don't expect them to
behave like self righteous pompous twats.


<OT> Yes. Though vague questions much like above, written in exactly
that
style and wording, sometimes seem to be trolls, perhaps by a
single
person (chellapa?). Mostly coming from gmail accounts over
google
groups (yes, I am too)

Some recent examplessabarish:
Hi friend,
what is the use of function pointer in c language and where it is
useful?
tell with simple example...?
plz help me. jkwagh
Hi friend,
I am currently working on a Parser project in which i want to parse
HTML and asp pages into .c file. So can you plz help me to do that?
Thanks in advanced
Jayant chellapa
hi all
I need to write a program to find mac address of a my computer using
libaries, is
this possible? How?
thanks


I don't think they are worth a real answer -- they
indicate a complete lack of respect for the time of those
being
questioned in that the poster has put no effort into the
matter
themselves and has not tried to find the right place to ask
the question. While rude/cruel responses aren't called for,
neither
are thoughtful answer to thoughtless questions. Perhaps the
correct answer to these posts is just a url:
http://www.catb.org/~esr/faqs/smart-questions.html
</OT>

-David

Nov 17 '05 #20

Chris Hills schrieb:
When people come here to ask "the experts" they don't expect them to
behave like self righteous pompous twats.


All right. But don't you see, that one and the same person (altough
under different gmail accounts) keeps asking questions here, one more
stupid and meaningless than the previous one? I'd not be surprised if
it turns out to be a robot.

Or maybe somebody needs some data for some psychological study.

Nov 17 '05 #21
In article <11*********************@g49g2000cwa.googlegroups. com>, Ingo
Menger <qu*********@consultant.com> writes

Chris Hills schrieb:
When people come here to ask "the experts" they don't expect them to
behave like self righteous pompous twats.


All right. But don't you see, that one and the same person (altough
under different gmail accounts) keeps asking questions here, one more
stupid and meaningless than the previous one? I'd not be surprised if
it turns out to be a robot.


Point taken.
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Nov 17 '05 #22

"Chris Hills" <ch***@phaedsys.org> wrote
Most computers nowadays are fast enough, and a good program is one that
does
what it says and is easy to use, not one that responds quickly.


Most computers on the planet are 8 bit micros with 256 RAM and 64K code
space..... At one time there were 3 or 4 in every PC.

Those aren't computers. A computer has backing store, which most embedded
microprocessors don't have. They still execute programs, but normally only
one
in their useful life.
Nov 19 '05 #23
In article <dl**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com>, Malcolm
<re*******@btinternet.com> writes

"Chris Hills" <ch***@phaedsys.org> wrote
Most computers nowadays are fast enough, and a good program is one that
does
what it says and is easy to use, not one that responds quickly.
Most computers on the planet are 8 bit micros with 256 RAM and 64K code
space..... At one time there were 3 or 4 in every PC.

Those aren't computers. A computer has backing store,


Where did you get that odd definition from. Try suggesting that in
comp.arch.embedded
which most embedded
microprocessors don't have.
It depends.... many do. They use everything from memory cards through to
hard drives. Most have a "backing store" of flash memory. I have seen 8
bit MCU that have ha hard drive attached.
They still execute programs, but normally only
one
in their useful life.


Not at all. Many are upgradable on the fly.

Most smart cards (and phone sims) are 8051 and they get updated often
and have a full file system.

I think you are well out of touch with embedded computing.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Nov 19 '05 #24

"Mark McIntyre" <ma**********@spamcop.net> wrote
I have a serious problem at work with programmers assuming unlimited
resources - about 2% of our overnight processing now consumes more
than 4GB of memory. If you've ever tried sourcing 16GB of memory for a
new Sun server, you'll know that this is an expensive mistake...

16 GB at 10 cents a megabyte, come to about 1600 dollars.
I would expect that amount of money to be available if I asked for it.

Of course you are right, temporarily it might be the situation that you
cannot just plug more memory in, and a program has to execute with the
resources it has got, not the resources you think it should have. But if Sun
cannot produce servers that can address 16GB of cheap memory, then they will
quickly be replaced by companies that can.
Nov 19 '05 #25
On Sat, 19 Nov 2005 17:06:52 +0000 (UTC), in comp.lang.c , "Malcolm"
<re*******@btinternet.com> wrote:

"Mark McIntyre" <ma**********@spamcop.net> wrote
I have a serious problem at work with programmers assuming unlimited
resources - about 2% of our overnight processing now consumes more
than 4GB of memory. If you've ever tried sourcing 16GB of memory for a
new Sun server, you'll know that this is an expensive mistake...
16 GB at 10 cents a megabyte, come to about 1600 dollars.


hahahaha!!!!!
You have /clearly/ never tried to buy memory for a Sun.
I would expect that amount of money to be available if I asked for it.
Multiply by twenty, and you're in the right ballpark.
Of course you are right, temporarily it might be the situation that you
cannot just plug more memory in,
Indeed. Often this is plain impossible. Not many retail PC mobos
support more than 2GB, for instance. And then there's the OS to
consider...
But if Sun
cannot produce servers that can address 16GB of cheap memory, then they will
quickly be replaced by companies that can.


Off the top of your head, name a few OSen that can address more than
4GB.

No cheating and using Osen not yet released, already defunct, or
requiring big iron.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 19 '05 #26
Mark McIntyre <ma**********@spamcop.net> writes:
Off the top of your head, name a few OSen that can address more than
4GB.

Linux?

--
/myr
Nov 20 '05 #27
In article <86************@localhost.localdomain>,
Espen Myrland <es***@localhost.localdomain> wrote:
Off the top of your head, name a few OSen that can address more than
4GB.
Linux?


All the main free unixes, I think, and MacOS X. Though I've heard
that MacOS X doesn't have 64-bit versions of its user-interface
libraries.

-- Richard
Nov 20 '05 #28
On 20 Nov 2005 02:14:12 GMT, in comp.lang.c , ri*****@cogsci.ed.ac.uk
(Richard Tobin) wrote:
In article <86************@localhost.localdomain>,
Espen Myrland <es***@localhost.localdomain> wrote:
Off the top of your head, name a few OSen that can address more than
4GB.
Linux?


Nope. Not unless you wander over into Linux64 territory, which is
still problematical.
All the main free unixes, I think,
Mostly have an upper limit of 4GB for any user process.
and MacOS X.


You're right about this one. Not much penetration into the real
computing world tho :-)
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 20 '05 #29
Mark McIntyre wrote
(in article <es********************************@4ax.com>):
On 20 Nov 2005 02:14:12 GMT, in comp.lang.c , ri*****@cogsci.ed.ac.uk
(Richard Tobin) wrote:
In article <86************@localhost.localdomain>,
Espen Myrland <es***@localhost.localdomain> wrote:
Off the top of your head, name a few OSen that can address more than
4GB.

Linux?
Nope. Not unless you wander over into Linux64 territory, which is
still problematical.


Strange comment, since I've been using it for years, and it
works like a champ, up to and including 64GB, 8 CPU hardware
configurations. It's been running without any troubles at all
on a much simpler 64-bit notebook for the last year or more
also.
and MacOS X.


You're right about this one. Not much penetration into the real
computing world tho :-)


That's changing, and rightfully so. It's basically the best of
the UNIX variants today, including Linux, is 64-bit capable down
deep, but the GUI still runs 32-bit.

Also not mentioned, is Win64, which is barely functional,
particularly for peripheral drivers at this point.

--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

Nov 20 '05 #30
On Sun, 20 Nov 2005 19:44:41 GMT, in comp.lang.c , Randy Howard
<ra*********@FOOverizonBAR.net> wrote:
Mark McIntyre wrote
(in article <es********************************@4ax.com>):

Nope. Not unless you wander over into Linux64 territory, which is
still problematical.
Strange comment, since I've been using it for years,


Thats as may be, and indeed I have an install disk from a few years
back. However I'm currently unaware of anyone using it commercially to
any meaningful degree. It anyone has some good case studies I'm
interested.
and MacOS X.


You're right about this one. Not much penetration into the real
computing world tho :-)


That's changing, and rightfully so.


Once Mac stop supporting only proprietary chips, things will look up.
Right now they're competing in the space occupied by Solaris and the
other big Unix vendors running on proprietary h/w.
Also not mentioned, is Win64, which is barely functional,
particularly for peripheral drivers at this point.


As I said, no cheating and mentioning vaporware... :-)
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 20 '05 #31
Mark McIntyre wrote
(in article <n8********************************@4ax.com>):
Nope. Not unless you wander over into Linux64 territory, which is
still problematical.
Strange comment, since I've been using it for years,


Thats as may be, and indeed I have an install disk from a few years
back.


That should be easily rectified, since multiple 64-bit distros,
for a number of processor architectures of current vintage can
be downloaded for free.
However I'm currently unaware of anyone using it commercially to
any meaningful degree. It anyone has some good case studies I'm
interested.
I'm not in the business of writing case studies, but I assure it
is being used to good effect by a lot of major companies,
whether they write papers on it or not.
and MacOS X.

You're right about this one. Not much penetration into the real
computing world tho :-)


That's changing, and rightfully so.


Once Mac stop supporting only proprietary chips, things will look up.


PPC is no more proprietary than Intel is. Both are available on
the open market. What you mean is, once they sell a motherboard
that looks sufficiently like a PC motherboard you'll be more
comfortable with it?

I used to think the same way, until I bought a mac, because I
wanted a box with a different byte order as an experiment.
Afterward, I figured out what all the shouting over OS X was
about and shifted gears completely.
Right now they're competing in the space occupied by Solaris and the
other big Unix vendors running on proprietary h/w.


Strange, all of those USB, firewire, PCI, PCI-X and PCI-express
slots don't look proprietary at all to me.
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

Nov 20 '05 #32

In article <n8********************************@4ax.com>, Mark McIntyre <ma**********@spamcop.net> writes:
On Sun, 20 Nov 2005 19:44:41 GMT, in comp.lang.c , Randy Howard
<ra*********@FOOverizonBAR.net> wrote:
Also not mentioned, is Win64, which is barely functional,
particularly for peripheral drivers at this point.


As I said, no cheating and mentioning vaporware... :-)


You may not like it, but Win64 is hardly "vaporware". I'm porting
stuff to it now; in fact, I'm posting between builds. I'm using this
particular Win64 machine remotely, over RDP, and it's been rock-solid.

Win64 is far more than "barely functional", in fact. At the VS 2005
kickoff, we had a demo with EDS running a big transaction-processing
app under our application server on Win64, on a 24-CPU (maybe a
32-CPU - I wasn't there, and I've read conflicting reports) Fujitsu
box. That's a real production-class application, running thousands
of transactions/minute.

Windows isn't my favorite OS, but it's quite capable. And that
includes Win64. (I'm sure "peripheral drivers" are important to many
users, but the people I talk to aren't having any problems with the
peripherals they use - which are mostly big SAN arrays.)

--
Michael Wojcik mi************@microfocus.com

She felt increasingly (vision or nightmare?) that, though people are
important, the relations between them are not, and that in particular
too much fuss has been made over marriage; centuries of carnal
embracement, yet man is no nearer to understanding man. -- E M Forster
Nov 23 '05 #33
Michael Wojcik wrote
(in article <dl*********@news3.newsguy.com>):
Win64 is far more than "barely functional", in fact.
[snipped trade show example]

If, and only if, you are very careful to choose all the hardware
so that you have working drivers. In the enterprise space that
is expected. However, XP64 is shipping, a market segment in
which people connect all sorts of 3rd party devices, video
cards, disk controllers, mice, you name it. Most of them do not
work reliably under Win64 XP. In short, it is where Linux64 was
several years ago, or slightly worse.
Windows isn't my favorite OS, but it's quite capable.


Especially if it never connects to the internet. After that,
all bets are off.
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

Nov 23 '05 #34
On 22 Nov 2005 04:26:58 GMT, in comp.lang.c , mw*****@newsguy.com
(Michael Wojcik) wrote:
You may not like it, but Win64 is hardly "vaporware".
What gives you the idea I don't like it? As it happens, I'm running a
project to port a bunch of analytics to both Win64 and Linux64. I just
don't consider either of them "production" ready in anything like the
same way that Win32 or Linux are.
Windows isn't my favorite OS, but it's quite capable. And that
includes Win64.
Come now, even MS admit its not a finished product.
(I'm sure "peripheral drivers" are important to many
users, but the people I talk to aren't having any problems with the
peripherals they use - which are mostly big SAN arrays.)


Specialised usage is an exception of course. Myself I merely need
64-bit versions of Java, Boost, xerces, perl, python, and a bunch of
other likewise stuff...
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 23 '05 #35

In article <uo********************************@4ax.com>, Mark McIntyre <ma**********@spamcop.net> writes:
On 22 Nov 2005 04:26:58 GMT, in comp.lang.c , mw*****@newsguy.com
(Michael Wojcik) wrote:
You may not like it, but Win64 is hardly "vaporware".
What gives you the idea I don't like it?


I didn't say you didn't like it.
As it happens, I'm running a
project to port a bunch of analytics to both Win64 and Linux64. I just
don't consider either of them "production" ready in anything like the
same way that Win32 or Linux are.


I see. Once again we have a case of Mark's Personal Terminology,
here for "vaporware". Alas, I remain unable to read your mind and
detect when you use a word in a sense other than its common one.
Windows isn't my favorite OS, but it's quite capable. And that
includes Win64.


Come now, even MS admit its not a finished product.


Where did I claim it was "finished"? I don't believe I've ever
used "finished" software, for that matter.

--
Michael Wojcik mi************@microfocus.com

It does basically make you look fat and naked - but you see all this stuff.
-- Susan Hallowell, TSA Security Lab Director, on "backscatter" scanners
Nov 23 '05 #36

In article <00*****************************@news.verizon.net> , Randy Howard <ra*********@FOOverizonBAR.net> writes:
Michael Wojcik wrote
(in article <dl*********@news3.newsguy.com>):
Windows isn't my favorite OS, but it's quite capable.


Especially if it never connects to the internet. After that,
all bets are off.


Linux does not have a sterling record in this regard either.

Windows, over the course of its development, has had an egregious
number of remotely-exploitable security holes. And most of those
were due to poorly-designed, poorly-implemented, unnecessary features
on the one hand, and defaulting to insecure behavior on the other.
But it is getting better; and it has never been the sole offender.

Personally, I'm far from satisfied with the security of any OS I use,
or indeed of nearly any piece of software, excepting embedded systems
with no security exposures.

--
Michael Wojcik mi************@microfocus.com

Global warming is just a theory. This is Intelligent Defrosting. -- "Gregg"
Nov 23 '05 #37
On 2005-11-22, Mark McIntyre <ma**********@spamcop.net> wrote:
On 22 Nov 2005 04:26:58 GMT, in comp.lang.c , mw*****@newsguy.com
(Michael Wojcik) wrote:
You may not like it, but Win64 is hardly "vaporware".


What gives you the idea I don't like it? As it happens, I'm running a
project to port a bunch of analytics to both Win64 and Linux64. I just
don't consider either of them "production" ready in anything like the
same way that Win32 or Linux are.
Windows isn't my favorite OS, but it's quite capable. And that
includes Win64.


Come now, even MS admit its not a finished product.


[this is all way off-topic, but] "Vaporware" has connotations beyond
being 'not a finished product' - not the least of which being that it
never _will_ be finished. There is a business practice which Microsoft
has been accused of in the past which includes announcing a product
without intending to make a serious effort to finish it, with the intent
of squashing interest in a competing product. That is one of the
meanings of the term "Vaporware". Another, more neutral, meaning, lacks
the anticompetitive claims but still has the core meaning of being a
product which is never really going to make it to market, or there will
at least be quite a long time waiting for it. The wikipedia article is
quite informative: <http://en.wikipedia.org/wiki/Vaporware>
Nov 23 '05 #38
On 23 Nov 2005 18:30:36 GMT, in comp.lang.c , mw*****@newsguy.com
(Michael Wojcik) wrote:

In article <uo********************************@4ax.com>, Mark McIntyre <ma**********@spamcop.net> writes:
On 22 Nov 2005 04:26:58 GMT, in comp.lang.c , mw*****@newsguy.com
(Michael Wojcik) wrote:
>You may not like it, but Win64 is hardly "vaporware".
What gives you the idea I don't like it?


I didn't say you didn't like it.


Perhaps its different wherever you live, but in the UK, "you may not
like it". unequivocally means "even though you don't like it". The
phrase is only ever used in the context of "no matter what you think,
you're wrong"
I see. Once again we have a case of Mark's Personal Terminology,
here for "vaporware".


*sigh*.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 24 '05 #39

In article <je********************************@4ax.com>, Mark McIntyre <ma**********@spamcop.net> writes:
On 23 Nov 2005 18:30:36 GMT, in comp.lang.c , mw*****@newsguy.com
(Michael Wojcik) wrote:
In article <uo********************************@4ax.com>, Mark McIntyre <ma**********@spamcop.net> writes:
On 22 Nov 2005 04:26:58 GMT, in comp.lang.c , mw*****@newsguy.com
(Michael Wojcik) wrote:

>You may not like it, but Win64 is hardly "vaporware".

What gives you the idea I don't like it?
I didn't say you didn't like it.


Perhaps its different wherever you live, but in the UK, "you may not
like it". unequivocally means "even though you don't like it".


I am in the UK rather frequently - at least a couple of times a year,
for at least a week at a time. And most of my coworkers are British.
And contemporary British fiction is one of my academic fields. Yet I
have never noticed this quirk of dialect. How odd.
The
phrase is only ever used in the context of "no matter what you think,
you're wrong"


So when someone says, oh, "You should try Branson pickle, though you
may not like it", they mean my opinion of it will inevitably be
incorrect?

In my experience - and I admit I have conversed with only a small
fraction of the world's English speakers - the clause "you may not
like it" sometimes indicates the possibility that the addressee may
have an unfavorable impression of the antecedent of the latter
pronoun. But communication is a tricky thing, and perhaps in that
dialect where "vaporware" (here a term of art, meaning roughly
"product which has been announced but has not been shown to exist in
any substantial form") means "product which isn't quite finished",
that phrase is always the idiom you describe.

--
Michael Wojcik mi************@microfocus.com

This record comes with a coupon that wins you a trip around the world.
-- Pizzicato Five
Nov 29 '05 #40
On 29 Nov 2005 16:15:30 GMT, in comp.lang.c , mw*****@newsguy.com
(Michael Wojcik) wrote:

In article <je********************************@4ax.com>, Mark McIntyre <ma**********@spamcop.net> writes:
On 23 Nov 2005 18:30:36 GMT, in comp.lang.c , mw*****@newsguy.com

Perhaps its different wherever you live, but in the UK, "you may not
like it". unequivocally means "even though you don't like it".
I am in the UK rather frequently - at least a couple of times a year,
for at least a week at a time. And most of my coworkers are British.
And contemporary British fiction is one of my academic fields.


I live in the UK, have lived here for 39 years, speak English as my
primary language, and virtually all my coworkers are British-born
nowadays. I also live on a diet of english language fiction, science
books and live /with/ a book editor and married into a family of
publishers. So enough of the credentials!
Yet I have never noticed this quirk of dialect. How odd.
Perhaps you simply never noticed that this was what it meant. :-)
So when someone says, oh, "You should try Branson pickle, though you
may not like it", they mean my opinion of it will inevitably be
incorrect?
Aha, I see. Thats an *entirely different* phrase. Seriously. There's
a world of difference between prepending and postpending the relevant
subclause. The location of the stress also is vitally important, and
thats of course tricky to get across in written media without
resorting to **spit** html..

These two phrases have quite different meanings...

"Though you may not like it, Branston pickle is good for you"
"Branston pickle is good for you, though you may not like it"

..... unless you stress the first "you" in the phrase under discussion
pronoun. But communication is a tricky thing,


indeed

(sarcasm snipped)
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 29 '05 #41

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

Similar topics

2
by: Ryan Hubbard | last post by:
Could someone provide me with some code to hold an object reference in a static variable in a function. function a(&$t){ static $b; if(is_object($b)){ print "IN - $b->logfile"; } else {...
3
by: Roman Simkin | last post by:
Hi, As far as I know, a static variable is a variable that belongs to a function or a class (are there any other options?). I've seen somewhere a function that *returns* static types - something...
1
by: Bryan Parkoff | last post by:
I know how to write "Pointer to Function" inside struct or class without using static, but I have decided to add static to all functions inside struct or class because I want member functions to be...
31
by: N.Davis | last post by:
I am very new to Python, but have done plenty of development in C++ and Java. One thing I find weird about python is the idea of a module. Why is this needed when there are already the ideas of...
12
by: opistobranchia | last post by:
I was on a job interview and the interviewer asked what "this" meant. I replied it represented this class like cout << a or cout << this.a then he asked what this meant if it was static? I...
669
by: Xah Lee | last post by:
in March, i posted a essay ā€œWhat is Expressiveness in a Computer Languageā€, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
14
by: Samant.Trupti | last post by:
Hi all, I have some code that I am unable to understand. Can you please help? int _tmain(int argc, _TCHAR* argv) { // Initialize COM environment. ccLib::CCoInitialize...
4
by: dolphin | last post by:
Hi All I read a .cpp files,find that static void fun(void){......} int main() { .......... } What does this static function mean?Is it the same as the static
1
by: christian.bau | last post by:
On Oct 9, 6:49Ā pm, regis <regis.barbanc...@free.frwrote: C99 Standard draft 6.7.4.3: "An inline deļ¬nition of a function with external linkage shall not contain a deļ¬nition of a modiļ¬able...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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...
0
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...
0
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,...

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.