public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Don Dugger <n0ano@valinux.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] call to sysinfo in ia32 mode trashes the stack
Date: Fri, 11 May 2001 21:12:10 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590693005570@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590693005569@msgid-missing>

Jose-

Not yet, it's on my todo list.

On Fri, May 11, 2001 at 10:57:17PM +0200, Jose Luu wrote:
> 
> 
> I noticed the above problem using kernel 2.4.1. Is it solved in 2.4.4 ?
> 
> Thanks
> Jose
> 
> ------------------------------ test
> program ------------------------------------
> 
> #include <stdio.h>
> #include <sys/sysinfo.h>
> 
> typedef struct {
> 
>     unsigned int dwTotalPhys ;
>     unsigned int dwAvailPhys ;
>     unsigned int dwTotalPageFile ;
>     unsigned int dwAvailPageFile ;
> }  MEMORYSTATUS;
> 
> int Memory(MEMORYSTATUS *lpmstMemStat)
> {
> #if defined(AIR_BAG)
>     char szBuffer[1000];
> #endif
> 
>       struct sysinfo info;
> 
>        if(sysinfo(&info))
>                return 1;
>        lpmstMemStat->dwTotalPhys = info.totalram;
>        lpmstMemStat->dwAvailPhys = info.freeram;
>        lpmstMemStat->dwTotalPageFile = info.totalswap;
>        lpmstMemStat->dwAvailPageFile = info.freeswap;
>        return 0;
> }
> 
> main ()
> {
>     MEMORYSTATUS mem;
>     if (Memory(&mem) != 0) {
> fprintf(stderr,"error\n");
>     }
>     fprintf(stderr,"Total Phys %u\n",mem.dwTotalPhys);
>     fprintf(stderr,"Avail Phys %u\n",mem.dwAvailPhys);
>     fprintf(stderr,"Total PageFile  %u\n",mem.dwTotalPageFile);
>     fprintf(stderr,"Avail PageFile  %u\n",mem.dwAvailPageFile);
> }
> 
> 
> 
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64

-- 
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
n0ano@valinux.com
Ph: 303/938-9838


      reply	other threads:[~2001-05-11 21:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-11 20:57 [Linux-ia64] call to sysinfo in ia32 mode trashes the stack Jose Luu
2001-05-11 21:12 ` Don Dugger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590693005570@msgid-missing \
    --to=n0ano@valinux.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox