gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] mac os x port questions


From: Aurelien Chanudet
Subject: Re: [Gcl-devel] mac os x port questions
Date: Mon, 16 Feb 2004 22:39:48 +0100

I was able to solve the case during the week-end : GCL is now running back again. Still, I've got a few questions to craft as optimal a solution as possible.

> 2) I really think it would be best to not hardwire the heap size, but
>   rather take the value from MAXPAGE*PAGESIZE set at configure time.

Thanks for the suggestion. Would the following memory layout be ok ?

+---------------------------------------+
|    text segment as produced by gcc    |
+---------------------------------------+ <- DBEGIN
|    data segment as produced by gcc    |
| (including .bss, .const and the like) |
+---------------------------------------+ <- sbrk(0)
|  wiggle room to allocate memory from  |
+---------------------------------------+ <- DBEGIN + MAXPAGE*PAGESIZE

> 3) Your strategy in my_sbrk should work, but will result in the
>   maximum image size for all applications regardless of complexity.
>   I don't know if your virtual memory system can realloc the heap
>   without moving, but if so this would be preferable.

That is, I should try increasing the size of the image little by little, as opposed to allocating a huge block of memory at initialization time, if possible ? The issue here is that I cannot figure out how to make sure that room needed is there without allocating it.

> 4) The example below, where you appear to have shrunk the heap
>   substantially, is indeed too small.  At the very minimum, there has
>   to be holesize+ (reloc pages) between heap_end and core_end.
>   Holesize defaults to 1/10 MAXPAGE, so we see here again that we'll
>   have less headaches using these macros where possible.

Sorry for such a basic question: what area is actually called the hole ? In the draft above, where would heap_end and core_end actually point to ?

> Will your DBEGIN vary at compile time?  If so, is it correctly
> detected and propagated by configure?

No problem here.

> Also, how does configure
> autodetect your machine type?  We can modify configure.in to set the
> --enable-machine variable automatically.

My machine is detected as powerpc-*-darwin*. I'll will come back with a patch for configure.in.

Thanks !





reply via email to

[Prev in Thread] Current Thread [Next in Thread]