On Oct 21, 2010, at 1:26 PM, Chris Jones wrote:
> 
> Actually, think about it, I am not 100% sure of that first yes. A single 
> process under the 32 bit kernel might still be limited to say 4G ram. Not 
> sure.

no.

This is easy to test:

% cat foo.c 
#include <stdlib.h>
#include <stdio.h>

int main( void ) {
        int big = 0x40000000;

        for( int i=0; i < 16; i++ ) {
                void * foo = malloc(big);
                if( NULL == foo ) {
                        printf( "%s", "malloc() failed, exiting\n" );
                        exit(EXIT_FAILURE);
                }
                printf("%d: block is at %p\n", i, foo);
        }

        return 0;
}
% gcc -std=c99 -arch i386 -arch x86_64 foo.c
% ./a.out 
0: block is at 0x100200000
1: block is at 0x141000000
2: block is at 0x181000000
3: block is at 0x1c1000000
4: block is at 0x201000000
5: block is at 0x241000000
6: block is at 0x281000000
7: block is at 0x2c1000000
8: block is at 0x301000000
9: block is at 0x341000000
10: block is at 0x381000000
11: block is at 0x3c1000000
12: block is at 0x401000000
13: block is at 0x441000000
14: block is at 0x481000000
15: block is at 0x4c1000000
% arch -i386 ./a.out 
0: block is at 0x200000
1: block is at 0x41000000
a.out(73934) malloc: *** mmap(size=1073741824) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
malloc() failed, exiting

I don't know of a good reason for a normal user to run the 64bit kernel.
--
Daniel J. Luke                                                                  
 
+========================================================+                      
  
| *---------------- [email protected] ----------------* |                      
    
| *-------------- http://www.geeklair.net -------------* |                      
    
+========================================================+                      
  
|   Opinions expressed are mine and do not necessarily   |                      
    
|          reflect the opinions of my employer.          |                      
    
+========================================================+



_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to