Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Macs and 64-bit Memory Addressing

From   Jeremy Fox <[email protected]>
To   [email protected]
Subject   Re: st: Macs and 64-bit Memory Addressing
Date   Fri, 31 Oct 2003 14:38:44 -0600

No argument here. However, there was speculation that OS X would receive
minimal 64-bit support (64-bit address space) upon the release of Panther and
that complete 64-bit support (file systems, etc.) would not happen until much
later. I've seen no evidence this has happened but from Apple's website ...

The appended C code describes the maximum amount of contiguous memory (2.25GB) which can be allocated under Jaguar and Panther. More non-contiguous memory can be scraped up with additional malloc statements, but it will be under 4GB. Mac users can see these 32-bit limits for themselves by typing

set memory 2195M

or some slightly smaller value into Stata, depending on the rest of Stata's overheads Increasing the value should not work, although

set matsize 11000

can be executed right after that, because memory and matsize are not contiguous in Stata. This maxes out Stata's total RAM use at 3GB (on any Mac running 10.2 or 10.3):

Current memory allocation

current memory usage
settable value description (1M = 1024k)

set maxvar 32767 max. variables allowed 11.376M
set memory 2195M max. data space 2,195.000M
set matsize 11000 max. RHS vars in models 924.080M

I hope Apple adds 64-bit memory addressing to future Mac OS versions. As a general comment, I hope Stata will support large datasets once Apple supports them, regardless of what the compiler company Metrowerks is doing.

The following compilation does not alter memory use on Panther on a G5. You cannot increase BIGINT further.

gcc -mpowerpc64 -mtune=970 big.c


#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define BIGINT 297000000LL

int main() {

double *out = malloc(BIGINT * sizeof(double));



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index