#!/bin/sh #Tag 0x006A0020 # # Change ACADBASE to AutoCAD Installation directory # ACADBASE=/opt/acad13 BIN=bin # ACADSERVER="localhost" # Use this for a faster GUI display #ACADDISPLAY="shm:0"; export ACADDISPLAY # Use this for a text-only disply ACADDISPLAY="NULL"; export ACADDISPLAY # ACAD="$ACADBASE/$BIN;$ACADBASE/support;$ACADBASE/fonts;$ACADBASE/ase;$ACADBASE/ase/sample;$XREFS" ACADDRV=$ACADBASE/drv if [ "$ACADCFG" = "" ] ; then ACADCFG=$ACADBASE/$BIN; export ACADCFG fi if [ "$RENDERCFG" = "" ] ; then RENDERCFG=$ACADBASE/$BIN; export RENDERCFG fi # Add AutoCAD and CDE library directories to the search path. if [ "$LD_LIBRARY_PATH" = "" ] ; then LD_LIBRARY_PATH="/usr/dt/lib:$ACADBASE/$BIN" else LD_LIBRARY_PATH="/usr/dt/lib:$ACADBASE/$BIN:$LD_LIBRARY_PATH" fi export LD_LIBRARY_PATH if [ "$RENDERCFG" = "" ] ; then RENDERCFG=$ACADCFG; export RENDERCFG fi if [ "$RHUADI" = "" ] ; then RHUADI=$ACADBASE/drv/rhprtl; export RHUADI fi # This line sets the default MTEXT editor if [ "$EDITOR" = "" ] ; then EDITOR="jot -fx"; export EDITOR fi EDITOR=""; export EDITOR export ACAD ACADDRV ACADSERVER # # Enable the CVmalloc features # _RLD_LIST="libmalloc_cv.so:libexc.so:DEFAULT"; export _RLD_LIST # # See: man cvmalloc_error for additional information. # Features may be enabled by uncommenting the line that defines them # You can run under the debugger or stand-alone # # MALLOC_VERBOSE n # (where n is an integer) controls printing of messages from the # library. If n = 0, messages are printed to stderr ony when an error # occurs. If n = 1 (the default), a messages is printed during # initialization, so that the user can tell that the library was # properly included in the application. If n = 2 or greater, detailed # information about all traced events, including the callstack at the # time the error was detected, is printed. This option is not # normally used by the end user, as it can produce a huge volume of # output. MALLOC_VERBOSE=2; export MALLOC_VERBOSE # # MALLOC_TRACING # enables tracing of all calls through the library. Tracing is # normally done in the course of a performance experiment; the # variable need not be set in such cases, as the running of the # experiment will automatically enable it. If the option is enabled # when the program is run independently, and MALLOC_VERBOSE is set to # 2 or greater, the trace events and program call stacks will be # written to stderr. #MALLOC_TRACING=1; export MALLOC_TRACING # # MALLOC_FASTCHK # enables corruption detection for library calls. Corruption # detection is done by allocating a space larger than the requested # area, and putting specific patterns in front of and behind the area # returned to the caller. When free is called, the patterns are # checked, and if the area was overwritten, an error message is # printed using an internal call to the routine cvmalloc_error. Under # the debugger, a trap may be set at exit from this routine to catch # the program at the error. MALLOC_FASTCHK=1; export MALLOC_FASTCHK # # MALLOC_FULLWARN # enables detection of some calls that are not strictly errors, but # represent sloppy programming, including free(NULL), malloc(0), and # realloc(ptr,0). MALLOC_FULLWARN=1; export MALLOC_FULLWARN # # MALLOC_MAXMALLOC n # (where n is an integer, in any base) sets a maximum size for any # malloc or realloc or memalign allocation. Any request exceeding # that size will be flagged as an error, and return a NULL pointer. #MALLOC_MAXMALLOC=; export MALLOC_MAXMALLOC # # MALLOC_NO_REUSE # specifies that no area that has been freed will be reused. With # this option enabled, no actual free calls are really made, and the # process space and swap requirements can grow quite large. If # MALLOC_FASTCHK is not enabled, any space that is freed by a realloc # may or may not get reused; if MALLOC_FASTCHK is enabled, such space # will not be reused. #MALLOC_NO_REUSE=; export MALLOC_NO_REUSE # # MALLOC_CLEAR_MALLOC # will clear the memory area upon each allocation. It also requires # MALLOC_FASTCHK be enabled. #MALLOC_CLEAR_MALLOC=; export MALLOC_CLEAR_MALLOC # # MALLOC_CLEAR_MALLOC_PATTERN # specifies a pattern to clear the data if MALLOC_CLEAR_MALLOC is # enabled. The default pattern is 0xfacebeef for the 32-bit version, # and 0xfacebeeffacebeef for the 64-bit versions. Only full words # (double words for 64-bits) are cleared to the pattern. #MALLOC_CLEAR_MALLOC_PATTERN- ; export MALLOC_CLEAR_MALLOC_PATTERN # # MALLOC_CLEAR_FREE # will clear the data upon any free call. It will only work if # MALLOC_FASTCHK is also enabled. #MALLOC_CLEAR_FREE=; export MALLOC_CLEAR_FREE # # MALLOC_CLEAR_FREE_PATTERN # specifies a pattern to clear the data if MALLOC_CLEAR_FREE is # enabled. The default pattern is 0xcafebeef for the 32-bit version, # and 0xcafebeefcafebeef for the 64-bit versions. Only full words # (double words for 64-bits) are cleared to the pattern. #MALLOC_CLEAR_FREE_PATTERN=; export MALLOC_CLEAR_FREE_PATTERN # # Use one of the following two methods to start AutoCAD # # Fire up acad inside the debugger # Hint: Use 'stop in cvmalloc_error' # #cvd $ACADBASE/$BIN/acad # # Or fire up acad stand-alone # #$ACADBASE/$BIN/acad $* # # Or fire up acad stand-alone with log file output # #$ACADBASE/$BIN/acad $* 2>&1 | tee cvmalloc.log