* [Linux-ia64] call to sysinfo in ia32 mode trashes the stack
@ 2001-05-11 20:57 Jose Luu
2001-05-11 21:12 ` Don Dugger
0 siblings, 1 reply; 2+ messages in thread
From: Jose Luu @ 2001-05-11 20:57 UTC (permalink / raw)
To: linux-ia64
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);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Linux-ia64] call to sysinfo in ia32 mode trashes the stack
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
0 siblings, 0 replies; 2+ messages in thread
From: Don Dugger @ 2001-05-11 21:12 UTC (permalink / raw)
To: linux-ia64
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-05-11 21:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox