Konstantin Münning wrote:
I would hapily contribute the code for a better MemAvail/MaxAvail
function if that's the problem. I would like to be able to use the
latest compiler which now I definitely can't as I must have the BP7
compatibility which is very good in 1.0.10.
IMO we have two
This means that such code *must* be changed (conditionalized...) before
it can be compiled for other platforms. Such a change can be enforced
when the legacy API only is implemented for DOS compatible target
platforms, inavailable on other platforms. But this doesn't mean that
the API is
Hans-Peter Diettrich wrote:
the API is completely removed, it should exist and behave as before, on
the platforms to which it applies.
It doesn't apply unconditionally to any current fpc target. Even go32v2
might run on windows with changing memory availabilities.
Konstantin Münning wrote:
And in all cases, the program will still crash occasionally because it
runs out of memory in certain cases, because the check and the
allocation do not happen atomically. You can't put something into the
standard Run Time Library which works most of the time, except
On Mon, 23 May 2005 02:29:48 +0200
Konstantin Münning [EMAIL PROTECTED] wrote:
But when there is no memory left and you need
some you can't behave perfect. Please let it be the programmers choice
what to do and how to handle this.
It is. Exceptions, ReturnNil, ...
A compiler should be
Florian Klaempfl wrote:
Konstantin Münning wrote:
By the way, I've found the following code in compiler/cclasses.pas when
I searched for the whereabouts of maxavail/memavail and there were some
more like this in the sources:
{$ifdef HASGETHEAPSTATUS}
status:=GetFPCHeapStatus;
Hi Micha!
Thanks for the amusing comments :-). Let me add some of mine.
Micha Nelissen wrote:
On Mon, 23 May 2005 02:29:48 +0200
Konstantin Münning [EMAIL PROTECTED] wrote:
But when there is no memory left and you need
some you can't behave perfect. Please let it be the programmers choice
Jonas Maebe wrote:
On 23 mei 2005, at 02:29, Konstantin Münning wrote:
What would you suggest to return under an OS like Windows, Mac OS X or
Linux? The current free memory of the OS? Free memory + buffer cache
- minimal buffer cache size enforced by the OS? The previous +
available swap
Environment changes sometimes you know! Thus, so does the RTL. There are
new means now.
New means are good. I'm happy with this. But the removal of some
basics which is not really enforced by the environment is what makes
me unhappy.
If it can't be implemented sanely, it is not a
On 23 mei 2005, at 11:09, Konstantin Münning wrote:
The only way to know that is to perform getmem's with every
increasing values until one fails.
I was not implying that a getmem(maxavail) must work under any
circumstances on a multitasking OS. But as the OS knows at a given
point what
{$ifdef fpc}const memavail=high(ptrint);maxavail=high(ptrint);{$endif}
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
{$ifdef fpc}const memavail=high(ptrint);maxavail=high(ptrint);{$endif}
That's a nice one :-)
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
On 23 mei 2005, at 11:43, Peter Vreman wrote:
{$ifdef fpc}const memavail=high(ptrint);maxavail=high(ptrint);{$endif}
Then we could maybe also add an optimization that checks whether you
are comparing against the upper or the lower bound of the current type
and completely optimize away the
Op Mon, 23 May 2005, schreef Jonas Maebe:
On 23 mei 2005, at 11:43, Peter Vreman wrote:
{$ifdef fpc}const memavail=high(ptrint);maxavail=high(ptrint);{$endif}
Then we could maybe also add an optimization that checks whether you
are comparing against the upper or the lower bound of the
Hi everybody!
Why in fact were MaxAvail,MemAvail,HeapSize removed from the RTL? The
explanation in install/doc/whatsnew.txt is puzzling me a bit:
- Removed MaxAvail, MemAvail, HeapSize due to their unreliability
(bogus/misleading return values) in multitasking environment with
swapping
Is
Florian Klaempfl wrote:
Konstantin Münning wrote:
Hi everybody!
Why in fact were MaxAvail,MemAvail,HeapSize removed from the RTL? The
explanation in install/doc/whatsnew.txt is puzzling me a bit:
- Removed MaxAvail, MemAvail, HeapSize due to their unreliability
(bogus/misleading
Konstantin Münning wrote:
Florian Klaempfl wrote:
Konstantin Münning wrote:
Hi everybody!
Why in fact were MaxAvail,MemAvail,HeapSize removed from the RTL? The
explanation in install/doc/whatsnew.txt is puzzling me a bit:
- Removed MaxAvail, MemAvail, HeapSize due to their unreliability
On 22 May 2005, at 20:07, Konstantin Münning wrote:
When you skip the check and allocate always then the program will
crash anyway when there is not enough memory.
No. Either you catch exceptions resulting from a lack of memory and
recover, and then you have the same checking as before,
On 23 May 2005, at 00:56, Konstantin Münning wrote:
No. Either you catch exceptions resulting from a lack of memory and
recover, and then you have the same checking as before, except
that the
check happens atomically (by the OS: you ask for more memory and if
there is no more memory, you
Jonas Maebe wrote:
On 23 May 2005, at 00:56, Konstantin Münning wrote:
No. Either you catch exceptions resulting from a lack of memory and
recover, and then you have the same checking as before, except that
the
check happens atomically (by the OS: you ask for more memory and if
there
20 matches
Mail list logo