[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: Patch for gcl-2.6.7 on MacOSX(10.4.2) to build maxima-5.
From: |
Aurelien Chanudet |
Subject: |
[Gcl-devel] Re: Patch for gcl-2.6.7 on MacOSX(10.4.2) to build maxima-5.9.[12] and so on. |
Date: |
Fri, 2 Dec 2005 08:23:04 +0100 |
> 1) revert void *my_sbrk to char *my_sbrk. Can we use a name which
> does not conflict with any system routine?
I suspect this is becausse /usr/include/unistd.h has changed between
Mac OS X 10.2 (which I think you have at utexas) and 10.4 which I
have. I'd suggest something like :
#if defined(flag identifyin Mac OS X 10.4)
void *my_sbrk();
#else
char *my_sbrk();
#endif
If you're happy with that, I can commit something like that.
> 2) Add _setjmp(env) to plttest.c to get both _setjmp and __setjmp
> symbols. I suspect there is a macosx version dependency to the
> name mangling issue we need to work out.(not committed)
Do you mean that the following call would work ?
void foo () { }
int main ()
{
(void) (*p) () = _foo;
(*p) ();
}
> 3) No root nor tcl/tk on the machine in question, so I cannot
> reproduce this issue, but I don't see where my_free and my_malloc
> appear in o/alloc.c???? Am I missing something dumb?
To the best of my understanding, the default behavior for gcl on Linux
is to override libc's default malloc/free routines. This is something
that cannot be done easily on Mac OS X (see README.macosx) : we simply
cannot override the system's default malloc. On Mac OS X, malloc
defaults to calling a low level memory allocation routine. For most
applications, the user doesn't have to care about this low level
memory allocation routine : the system provides a default allocation
routine transparently. However, in gcl, we provide our ow low level
memory allocation routine which is simply a wrapper around malloc
defined in o/alloc.c. Therefore, what we in h/powerpc-macosx.h do is :
#undef malloc
#define malloc my_malloc
typical call the system's default malloc -> call to our low level
memory management routine (defined in o/unexmacosx.c) -> call to gcl's
custom memory allocation routine (defined in o/alloc.c) whose named is
changed from malloc to my_malloc
Therefore, we have a symbol called my_malloc in o/alloc.c (try nm |
grep my_malloc on o/alloc.o).
> Will look at axiom, acl2, and cvs head next. May I request:
>
> 1) That we elide the diagnostic material output on save system? This
> might alarm the typical user. BTW, have confirmed that the old
> save-system bug we were chasing in 2.6.6 is gone, or at least
> intermittent :-).
OK, I'll do something like :
#define VERBOSE
> 2) That we see about scaling the heap size from configure like on
> other platforms?
Do you mean : is the regular scheme used to scale the heap size on
other platforms likely to work on Mac OS X ? I bet so.
Aurelien