On Thu 03 Oct 2002 15:19, "Green, Paul" <[EMAIL PROTECTED]> wrote:
> sbrk is very Unixish.
I know. I'm not targetting Win32 (memory shortage is not an option, but a
feature) or OS/2. I was targetting my own problem/curiousity and probing the
usefulness of making it public.
My initial sbrk probe used
--8<---
use Inline C => '
long MemUsed ()
{
return ((long)sbrk (0));
}'
-->8---
Then I thought it was very likely that I would use this more than once, so I
turned it into a module, but before I installed it, well, you all saw it
> It isn't in POSIX at all. Our system is highly POSIX
> compliant but doesn't have a function that directly maps to sbrk. We do
> have a way of determining heap max size and heap current usage, but it is a
> functional (subroutine) interface. If you had a function that just
> calculated heap usage it would be easier for me to replace it.
>
> Thanks
> PG
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.8.0 & 633 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
WinNT 4, Win2K pro & WinCE 2.11. Smoking perl CORE: [EMAIL PROTECTED]
http:[EMAIL PROTECTED]/ [EMAIL PROTECTED]
send smoke reports to: [EMAIL PROTECTED], QA: http://qa.perl.org