[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory limits?

From: address@hidden
Subject: Re: Memory limits?
Date: Tue, 22 Sep 2020 08:50:44 +0200 (CEST)

> The reason I asked is because a 1GB limit could point towards some 32bit
> limitation, just a guess.

Inspection of the source code shows some use of 'int' type.

The 'int' type is 4 bytes, even in 64 bit executables whereas 'long' can be 8 
bytes or 4 bytes,
depending on compiled in 32bit or 64bit mode.

So the use of the 'int' type may impose in some cases some kind of 32bit 
it is an indirect limitation as the counter refers to the number of objects, 
not to the actual memory size.

So basically what you have to find out is whether anyone is using GNU st in 64 
mode with large numbers of objects.

It is perhaps not so difficult after all to remove those usages of 'int' and 
the resulting limitations.

Also there is (almost non-existing) possibility that it is different on your 
platform, but extremely unlikely:

$ cc -m32 sizeofint.c
$ ./a.out
sizeof(int) is 4

$ cc -m64 sizeofint.c
$ ./a.out
sizeof(int) is 4

$ cat sizeofint.c   

#include <stdio.h>

int main(int argc,char *argv[])
  int i = 1 << 23;
  printf("sizeof(int) is %d\n",sizeof(int)); 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]