Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   freestanding vs hosted implementations (http://www.velocityreviews.com/forums/t314010-freestanding-vs-hosted-implementations.html)

Bill Cunningham 07-05-2003 01:45 AM

freestanding vs hosted implementations
 
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! =-----

Artie Gold 07-05-2003 02:53 AM

[OT] Could you elaborate? Re: freestanding vs hosted implementations
 
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 =---

bd 07-05-2003 03:09 AM

Re: [OT] Could you elaborate? Re: freestanding vs hosted implementations
 
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


Simon Biber 07-05-2003 03:12 AM

Re: [OT] Could you elaborate? Re: freestanding vs hosted implementations
 
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.



Artie Gold 07-05-2003 03:40 AM

Re: [OT] Could you elaborate? Re: freestanding vs hosted implementations
 
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 =---

Morris Dovey 07-06-2003 12:14 PM

Re: freestanding vs hosted implementations
 
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



All times are GMT. The time now is 04:03 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.