• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
: 64-bit question (Mike Fischer)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

: 64-bit question (Mike Fischer)


  • Subject: : 64-bit question (Mike Fischer)
  • From: Bob Bader <email@hidden>
  • Date: Wed, 23 Nov 2005 15:21:56 -0500

I have reported my issues to Apple and they have logged/confirmed it as a bug and hopefully it will get resolved in upcoming releases.  Thanks for all the help and responses.

Also,   

Does anyone have any recommendations for an application that will display memory usage for Apps using over 4 gigs of memory, since top can not display this info correctly.   Maybe re-compile top for 64-bit integers?

Since It is possible to have an application utilize all available memory util the machine re-boots, is there a way to limit the amount of an memory an application uses?  My developers tried  ulimit with -a or -l but it did not work.



thanks


Bob





------------  Orignial Post ----------------------------------
Begin forwarded message:
From: Bob Bader <email@hidden>
Date: November 3, 2005 2:30:49 PM EST
To: email@hidden
Subject: 64-bit question



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

  • Follow-Ups:
    • glibtool question
      • From: plumber Idraulico <email@hidden>
  • Prev by Date: Re: POSIX paths and UTF-8 on Mac OS X...
  • Next by Date: 10.4, MH_BUNDLE, and DYLD_IMAGE_ADDED dyld_events
  • Previous by thread: Re: POSIX paths and UTF-8 on Mac OS X...
  • Next by thread: glibtool question
  • Index(es):
    • Date
    • Thread