64-bit question
64-bit question
- Subject: 64-bit question
- From: Bob Bader <email@hidden>
- Date: Thu, 3 Nov 2005 14:30:49 -0500
I am an admin for a box that my department has users doing
development work on. We have 8 gigs of ram in the machine and have
been waiting to go to Tiger and 64-bit. I just upgraded the machine
to tiger and my users are telling me the below conditions
Can anyone confirm this or tell me what is going on? why does this
crash a 10.4 machine but not Linux.
I apologize if this is not the right forum for this question and
would appreciate any ideas on where I can get my questions answered.
Thanks
Bob
---------------- Observations from my users -----------------------
1. The "top" command does not display the correct memory allocation
status for a given process. To be precise, it is not able to show the
values for memory greater than 4GB so it's a kind of hard to test
high-mem applications. Looks like it's just the old 32bit "top",
without 64bit capability.
2. We wrote and executed a custom C program to test the 64bit C
compiler the system came with. It also tests 64bit environment and a
system's general ability to handle high-mem apps. The application was
able to allocate about 15GB on your test box and ... then the
machine rebooted! Unacceptable!
The program is listed belowl, to compile it just execute:
gcc -arch ppc64 c-bigmem-test.c -o c-bigmem-test.exe
"c-bigmem-test.exe" is the output - an executable file you may run.
The program is straightforward and it just tries to allocate more and
more memory and it doesn't stop by itself (leave it or kill it!). On
the screen you'll see the value of current memory taken. We tested it
on the 64bit Linux /the memory status obtained from 64bit "top"
matched the values printed out by our C program/ and when all system
resources (physical memory + swap/hdd/ memory ) ran out, it was
killed by the kernel which is correct.
Here is the code
--------
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define ARRAY_SIZE 1000000
int main(){
char **bigbuf;
char buf [ARRAY_SIZE];
long long int i=0;
for(i=0;i<ARRAY_SIZE;i++){
buf[i]='A';
}
bigbuf=malloc(ARRAY_SIZE*sizeof(char *));
if(bigbuf==NULL){
printf("Main malloc failed!\n");
}
i=0;
while(++i){
char * str_tmp=malloc(ARRAY_SIZE*sizeof(char));
if(str_tmp==NULL){
printf("Internal malloc failed!\n");
}
bigbuf[i]=str_tmp;
strcpy(bigbuf[i], buf);
if(i==0) {printf("MB allocated: %lld\n",i);};
}
return 0;
}
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden