On Sun, 2 Mar 2008 18:18:16 UTC, Kelsey Bjarnason
<> wrote:
> [snips]
>
> On Sat, 01 Mar 2008 19:19:03 +0000, Herbert Rosenau wrote:
>
> > In contrary to your false assumption there is nothing in the standard
> > that forbids to give back borrowed memory to the OS and request it from
> > there again when needed.
>
> Actually, the wording of the standard forbids it. If you disagree,
> please point out any part of the definition of free which allows
> implementation-defined or unspecified behaviour which would allow free to
> behave as you describe.
Again, where in the stadard is 'make available to further allocation
only to the current program in a multiprogram environment' mentioned?
I can find only 'make available for furhter allocation by anywhom' who
can get that block' There no requirement that the block has only to
give out
- in lower size
- in bigger size
- to the same thread
- to other thread
- to the same process
- to other process
- to a driver
- never to a driver
- to the OS for internal use
- ...
The standard simple lefts unspecified who will, can, may, should (not)
do the allocation request. As it is unspecified it is left to the
implementation to define which receivers will able to recive the
memory. You faild until now to give chapter and verse the standard
forbids/denys that memory that was given once to a program can no more
given to another. That proves that you are wrong.
> You can't; it's not there. What is there is a black-and-white guarantee,
> made by the C standard, about the C standard library, to the C program
> and C programmer: the memory *is* made available for further allocation.
>
> You're arguing that the C standard is *not* in fact defining the
> behaviour of the C standard library, that we're free to add in any random
> additional crud we feel like, whenever we want, as long as it's not
> *explicitly* forbidden by the standard.
>
> So, for example, nothing in the standard *explicitly* forbids the
> following from printing "Yes!":
>
> int x = 3;
>
> if ( ++x == 179 )
> puts( "Yes!" );
>
> There's nothing in the standard which explicitly forbids this is there?
> No, there isn't. If you don't believe me, feel free to check and quote
> C&V which forbids this.
You comes with complete nonsens because you fails to give chapter and
verse where the standard specifies that anything that is not explicity
allowed is forbidden.
> No, what the standard does is defines the behaviour that *is* supposed to
> - even guaranteed to - happen. That *defined* behaviour is what prevents
> the above printing "Yes!". Just as the *defined* behaviour is what
> prevents free returning the memory to the OS; the definition of free
> *does not allow it* unless the implementation can *guarantee* the memory
> will be made available to the program again - which, in the general case,
> it cannot, meaning in the general case it *must* not return the memory to
> the OS.
Now you comes and says that the stadard allows giving the now freed
memory away to anywhom who requests it as it does not forbids that
explicity - in contrast to any you've sayd before.
--
Tschau/Bye
Herbert
Visit
http://www.ecomstation.de the home of german eComStation
eComStation 1.2R Deutsch ist da!