dcm@sfsup.att.com (10/20/88)
I am running GNU Emacs 18.51 on an Amdahl 580 running UTS 5.2.5. I have encountered the memory allocation bug as described in etc/MACHINES for the amdahl. The fix is to change m-amdahl.h to define C_ALLOCA or to write your own alloca() in assembler. (I have one in the works.) The alloca() provided with UTS is buggy and will cause the process to grow outrageously. I tested this by editing PROBLEMS (invoked as "xemacs ../PROBLEMS") and using M-e to move to the following line: * temacs prints "Pure Lisp storage exhausted" Using alloca() as provided with UTS, the process size a shown by "ps -l" was 308, using the provided alloca.c the size was 191. Further testing appears to indicate that the allocation problem is really contained. When I get a working alloca() is assembled for the Amdahl, I will submit it for inclusion with GNU Emacs. -- David C. Miller, Consultant AT&T Information Systems 190 River Road 5-213 Summit, NJ 07901 (201) 522-6541 dcm@attunix.UUCP
dcm@sfsup.att.com (10/20/88)
I overlooked another change to m-amdahl.h so in the interest of simplicity I am attaching my fixed version below. Sorry for any inconvenience. -- David C. Miller, Consultant AT&T Information Systems 190 River Road 5-213 Summit, NJ 07901 (201) 522-6541 dcm@attunix.UUCP : -------------------- cut here ------------------------------ #!/bin/sh # This is a shell archive (1 of 1), meaning: # 1. Remove everything above the #!/bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # ./m-amdahl.h # Manifest # This archive created: Wed Oct 19 17:24:23 EDT 1988 export PATH || (echo "This is not sh, feeding shar to sh"; sh $0; kill $$) export PATH; PATH=/bin:$PATH if /bin/ls -ld ./m-amdahl.h > /dev/null 2>&1 then echo "shar: File ./m-amdahl.h not extracted, already exists" else echo "shar: Extracting "./m-amdahl.h" (5132 bytes)" sed 's/^XX//' << \End_Of_./m-amdahl.h > ./m-amdahl.h XX/* m-amdahl_uts file XX Copyright (C) 1987 Free Software Foundation, Inc. XX XXThis file is part of GNU Emacs. XX XXGNU Emacs is distributed in the hope that it will be useful, XXbut WITHOUT ANY WARRANTY. No author or distributor XXaccepts responsibility to anyone for the consequences of using it XXor for whether it serves any particular purpose or works at all, XXunless he says so in writing. Refer to the GNU Emacs General Public XXLicense for full details. XX XXEveryone is granted permission to copy, modify and redistribute XXGNU Emacs, but only under the conditions described in the XXGNU Emacs General Public License. A copy of this license is XXsupposed to have been given to you along with GNU Emacs so you XXcan know your rights and responsibilities. It should be in a XXfile named COPYING. Among other things, the copyright notice XXand this notice must be preserved on all copies. */ XX XX/* XXThis file for amdahl_uts created by modifying the m-template.h XXby Jishnu Mukerji 3/1/87 XX XXUse s-usg5-2-2.h with this file. XX XXThis file works with the Amdahl uts native C compiler. The 5.2u370 XXcompiler is so brain damaged that it is not even worth trying to use it. XX*/ XX XX/* The following three symbols give information on XX the size of various data types. */ XX XX#define SHORTBITS 16 /* Number of bits in a short */ XX XX#define INTBITS 32 /* Number of bits in an int */ XX XX#define LONGBITS 32 /* Number of bits in a long */ XX XX/* Define BIG_ENDIAN iff lowest-numbered byte in a word XX is the most significant byte. */ XX XX#define BIG_ENDIAN XX XX/* Define NO_ARG_ARRAY if you cannot take the address of the first of a XX * group of arguments and treat it as an array of the arguments. */ XX XX#undef NO_ARG_ARRAY XX XX/* Define WORD_MACHINE if addresses and such have XX * to be corrected before they can be used as byte counts. */ XX XX#define WORD_MACHINE /* not actually used anywhere yet! */ XX XX/* Define how to take a char and sign-extend into an int. XX On machines where char is signed, this is a no-op. */ XX XX#define SIGN_EXTEND_CHAR(c) (((sign_extend_temp=(c)) & 0x80) \ XX ? (sign_extend_temp | 0xFFFFFF00) \ XX : (sign_extend_temp)) XX XX/* Now define a symbol for the cpu type, if your compiler XX does not define it automatically: XX vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO XX are the ones defined so far. */ XX XX/* uts gets defined automatically */ XX/* However for clarity define amdahl_uts */ XX#define amdahl_uts XX XX/* Use type int rather than a union, to represent Lisp_Object */ XX/* This is desirable for most machines. */ XX XX#define NO_UNION_TYPE XX XX/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend XX the 24-bit bit field into an int. In other words, if bit fields XX are always unsigned. XX XX If you use NO_UNION_TYPE, this flag does not matter. */ XX XX#define EXPLICIT_SIGN_EXTEND XX XX/* Data type of load average, as read out of kmem. */ XX XX/* #define LOAD_AVE_TYPE long*/ XX XX/* Convert that into an integer that is 100 for a load average of 1.0 */ XX XX/*#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0)*/ XX XX/* Define CANNOT_DUMP on machines where unexec does not work. XX Then the function dump-emacs will not be defined XX and temacs will do (load "loadup") automatically unless told otherwise. */ XX XX/* #define CANNOT_DUMP XX XX/* Define VIRT_ADDR_VARIES if the virtual addresses of XX pure and impure space as loaded can vary, and even their XX relative order cannot be relied on. XX XX Otherwise Emacs assumes that text space precedes data space, XX numerically. */ XX XX/* #define VIRT_ADDR_VARIES*/ XX XX/* Define C_ALLOCA if this machine does not support a true alloca XX and the one written in C should be used instead. XX Define HAVE_ALLOCA to say that the system provides a properly XX working alloca function and it should be used. XX Define neither one if an assembler-language alloca XX in the file alloca.s should be used. */ XX XX/* #define C_ALLOCA */ XX#define HAVE_ALLOCA XX XX#ifdef HAVE_ALLOCA XX#define LIB_STANDARD -lPW -lc XX#endif XX XX/* Define NO_REMAP if memory segmentation makes it not work well XX to change the boundary between the text section and data section XX when Emacs is dumped. If you define this, the preloaded Lisp XX code will not be sharable; but that's better than failing completely. */ XX XX/*#define NO_REMAP*/ XX XX#define TERMINFO XX XX/* The usual definition of XINT, which involves shifting, does not XX sign-extend properly on this machine. */ XX XX#define XINT(i) (((sign_extend_temp=(i)) & 0x00800000) \ XX ? (sign_extend_temp | 0xFF000000) \ XX : (sign_extend_temp & 0x00FFFFFF)) XX XX#ifdef emacs /* Don't do this when making xmakefile! */ XXextern int sign_extend_temp; XX#endif XX XX/* The following needed to load the proper crt0.o and to get the XX proper declaration of data_start in the #undef NO_REMAP case */ XX XX#ifndef NO_REMAP XX#define START_FILES pre-crt0.o /lib/crt0.o XX#endif XX XX/* Perhaps this means that the optimizer isn't safe to use. */ XX XX#define C_OPTIMIZE_SWITCH XX XX/* Put text and data on non-segment boundary; makes image smaller */ XX XX#define LD_SWITCH_MACHINE -N XX XX/* When writing the 'xemacs' file, make text segment ro */ XX#define EXEC_MAGIC 0410 XX XX/* Tell alloca.c which direction stack grows. */ XX#define STACK_DIRECTION -1 End_Of_./m-amdahl.h count=`sum ./m-amdahl.h | awk '{print $1}'` if [ $count -ne 35055 ] then echo "shar: Error extracting ./m-amdahl.h, should have been 5132 bytes" fi fi if /bin/ls -ld Manifest > /dev/null 2>&1 then echo "shar: File Manifest not extracted, already exists" else echo "shar: Extracting "Manifest" (162 bytes)" sed 's/^XX//' << \End_Of_Manifest > Manifest XXFilename Kit Number Type of file XX---------------------------------------- XX./m-amdahl.h 1 FILE XXManifest 1 FILE End_Of_Manifest count=`sum Manifest | awk '{print $1}'` if [ $count -ne 9062 ] then echo "shar: Error extracting Manifest, should have been 162 bytes" fi fi exit 0