64 bit support
This commit is contained in:
parent
0337caea00
commit
f721fdf782
|
|
@ -1,3 +1,6 @@
|
||||||
|
2010-02-08 Holger Vogt
|
||||||
|
* com_sysinfo.c: 64 bit support enabled
|
||||||
|
|
||||||
2010-02-07 Dietmar Warning
|
2010-02-07 Dietmar Warning
|
||||||
* cpl/cplload.c, cplsetup.c, /txl/txlload.c, txlsetup.c, include/swec.h, multi_line.h,
|
* cpl/cplload.c, cplsetup.c, /txl/txlload.c, txlsetup.c, include/swec.h, multi_line.h,
|
||||||
frontend/subckt.c, parser/inp2p.c, inppas2.c: no more float's, improve dc solution by
|
frontend/subckt.c, parser/inp2p.c, inppas2.c: no more float's, improve dc solution by
|
||||||
|
|
|
||||||
|
|
@ -52,10 +52,10 @@ typedef struct TSI {
|
||||||
|
|
||||||
/* memory info */
|
/* memory info */
|
||||||
struct sys_memory {
|
struct sys_memory {
|
||||||
unsigned long int size_m; /* Total memory size */
|
long long size_m; /* Total memory size */
|
||||||
unsigned long int free_m; /* Free memory */
|
long long free_m; /* Free memory */
|
||||||
unsigned long int swap_t; /* Swap total */
|
long long swap_t; /* Swap total */
|
||||||
unsigned long int swap_f; /* Swap free */
|
long long swap_f; /* Swap free */
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sys_memory mem_t_act;
|
static struct sys_memory mem_t_act;
|
||||||
|
|
@ -65,7 +65,7 @@ static size_t get_sysmem(struct sys_memory *memall);
|
||||||
|
|
||||||
/* Print to stream the given memory size in a human friendly format */
|
/* Print to stream the given memory size in a human friendly format */
|
||||||
static void
|
static void
|
||||||
fprintmem(FILE* stream, unsigned long int memory) {
|
fprintmem(FILE* stream, long long memory) {
|
||||||
if (memory > 1048576)
|
if (memory > 1048576)
|
||||||
fprintf(stream, "%8.6f MB", memory/1048576.);
|
fprintf(stream, "%8.6f MB", memory/1048576.);
|
||||||
else if (memory > 1024)
|
else if (memory > 1024)
|
||||||
|
|
@ -129,7 +129,7 @@ static size_t get_sysmem(struct sys_memory *memall) {
|
||||||
char buffer[2048];
|
char buffer[2048];
|
||||||
size_t bytes_read;
|
size_t bytes_read;
|
||||||
char *match;
|
char *match;
|
||||||
long mem_got;
|
long long mem_got;
|
||||||
|
|
||||||
if((fp = fopen("/proc/meminfo", "r")) == NULL) {
|
if((fp = fopen("/proc/meminfo", "r")) == NULL) {
|
||||||
perror("fopen(\"/proc/meminfo\")");
|
perror("fopen(\"/proc/meminfo\")");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue