By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,385 Members | 1,737 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,385 IT Pros & Developers. It's quick & easy.

freestanding vs hosted implementations

P: n/a
I hope this isn't OT.
What is the purpose of a free standing implementation of C? stdio.h
isn't even included. I've only used hosted implentation.

Bill

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
bd wrote:
On Fri, 04 Jul 2003 21:45:43 -0400, Bill Cunningham wrote:

I hope this isn't OT.
What is the purpose of a free standing implementation of C? stdio.h
isn't even included. I've only used hosted implentation.

In some situations, the whole C Library would be impossible to fit. E.g.
an embedded device. Or, it may not yet be available, like in the Linux

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel.

~~~~~~~

Could you elaborate?

Thanks,
--ag
--
Artie Gold -- Austin, Texas

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 13 '05 #2

P: n/a
bd
On Fri, 04 Jul 2003 21:53:48 -0500, Artie Gold wrote:
bd wrote:
On Fri, 04 Jul 2003 21:45:43 -0400, Bill Cunningham wrote:

I hope this isn't OT.
What is the purpose of a free standing implementation of C? stdio.h
isn't even included. I've only used hosted implentation.

In some situations, the whole C Library would be impossible to fit. E.g.
an embedded device. Or, it may not yet be available, like in the Linux

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel.

~~~~~~~

Could you elaborate?


The Linux kernel dosen't have access to the C library - it's responsible
for using non-standard methods to load it for other programs. Also, the
malloc() method of memory allocation is unacceptable for the kernel, as it
leads to internal fragmentation of the address space.

--
Freenet distribution not available
I have often regretted my speech, never my silence.
-- Publilius Syrus

Nov 13 '05 #3

P: n/a
Artie Gold wrote:
bd wrote:
In some situations, the whole C Library would be impossible to fit.
E.g. an embedded device. Or, it may not yet be available, like in

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
the Linux kernel.

~~~~~~~~~~~~~~~~~

Could you elaborate?


Code that runs from an operating system kernel, such as a device driver,
typically does not have access to the C standard library. The kernel is
considered to be a freestanding environment.

--
Simon.
Nov 13 '05 #4

P: n/a
bd wrote:
On Fri, 04 Jul 2003 21:53:48 -0500, Artie Gold wrote:

bd wrote:
On Fri, 04 Jul 2003 21:45:43 -0400, Bill Cunningham wrote:

I hope this isn't OT.
What is the purpose of a free standing implementation of C? stdio.h
isn't even included. I've only used hosted implentation.
In some situations, the whole C Library would be impossible to fit. E.g.
an embedded device. Or, it may not yet be available, like in the Linux


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel.


~~~~~~~

Could you elaborate?

The Linux kernel dosen't have access to the C library - it's responsible
for using non-standard methods to load it for other programs. Also, the
malloc() method of memory allocation is unacceptable for the kernel, as it
leads to internal fragmentation of the address space.

Ah. _That's_ what you meant.
Of course, infinite regress being what it is.... ;-)
[Of course a kernel would be inherently non-standard in any event; its
`hostedness' is largely irrelevant.]

Thanks,
--ag
--
Artie Gold -- Austin, Texas

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 13 '05 #5

P: n/a
Bill Cunningham wrote:
What is the purpose of a free standing implementation of C?
stdio.h isn't even included. I've only used hosted
implentation.


Basically, it provides for those environments where C programs
can have non-standard entry/exit mechanisms, i.e. no command line
(and hence no command line parameters, no system() function that
depends on a shell or command line interpreter, and (perhaps)
nothing to return to.

Most of the free-standing implementations are embedded
applications (e.g. cable modem, washing machine); and the
remainder are the "host" part of hosted systems (ex: kernel, I/O
subsystems).

Free-standing implementations are free to dispense with support
for those elements set forth in the standard that just don't make
any sense in their particular context. Typically, the standard
I/O capabilities are severely trimmed or omitted, memory
management may be dropped in favor of pre-allocated
regions/variables, and pointers to specific memory, I/O, and
control space locations may abound.
--
Morris Dovey
West Des Moines, Iowa USA
C links at http://www.iedu.com/c

Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.